16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 04:19:19 +02:00

sound positioning fixes and other changes

This commit is contained in:
milek7
2017-08-21 12:44:18 +02:00
parent 92442b8bf7
commit 5104d7f4fd
3 changed files with 22 additions and 11 deletions

View File

@@ -1138,8 +1138,17 @@ bool TWorld::Update()
Update_Camera( dt );
sound_man->set_listener(Camera.Pos, Camera.LookAt, Camera.vUp);
sound_man->update(dt);
{
glm::dmat4 cam_matrix;
Camera.SetMatrix(cam_matrix);
glm::vec3 pos(Camera.Pos.x, Camera.Pos.y, Camera.Pos.z);
glm::vec3 at = glm::vec3(0.0, 0.0, -1.0) * glm::mat3(cam_matrix);
glm::vec3 up = glm::vec3(0.0, 1.0, 0.0) * glm::mat3(cam_matrix);
sound_man->set_listener(pos, at, up);
sound_man->update(dt);
}
GfxRenderer.Update( dt );
ResourceSweep();