Fix sound not being played at the correct place.
authorNovatux <nathanael.courant@laposte.net>
Sat, 15 Mar 2014 14:08:43 +0000 (15:08 +0100)
committerNovatux <nathanael.courant@laposte.net>
Sat, 15 Mar 2014 15:25:34 +0000 (16:25 +0100)
src/game.cpp

index 2b14b2c8e39fe5c46306787b8996c4aea813aba5..0a9dcfdae2c4c554ad32ff4f777f6eceedd31bf7 100644 (file)
@@ -2659,7 +2659,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
                }
                
                // Update sound listener
-               sound->updateListener(camera.getCameraNode()->getPosition(),
+               sound->updateListener(camera.getCameraNode()->getPosition()+intToFloat(camera_offset, BS),
                                v3f(0,0,0), // velocity
                                camera.getDirection(),
                                camera.getCameraNode()->getUpVector());