diff --git a/src/audio/sfx_manager.cpp b/src/audio/sfx_manager.cpp index 1a8ad86fc..03261862c 100644 --- a/src/audio/sfx_manager.cpp +++ b/src/audio/sfx_manager.cpp @@ -814,15 +814,15 @@ void SFXManager::reallyPositionListenerNow() float orientation[6]; orientation[0] = m_listener_front.getX(); orientation[1] = m_listener_front.getY(); - orientation[2] = m_listener_front.getZ(); + orientation[2] = -m_listener_front.getZ(); //up vector orientation[3] = m_listener_up.getX(); orientation[4] = m_listener_up.getY(); - orientation[5] = m_listener_up.getZ(); + orientation[5] = -m_listener_up.getZ(); const Vec3 &pos = m_listener_position.getData(); - alListener3f(AL_POSITION, pos.getX(), pos.getY(), pos.getZ()); + alListener3f(AL_POSITION, pos.getX(), pos.getY(), -pos.getZ()); alListenerfv(AL_ORIENTATION, orientation); } m_listener_position.unlock(); diff --git a/src/audio/sfx_openal.cpp b/src/audio/sfx_openal.cpp index ef8046ee0..1d676410a 100644 --- a/src/audio/sfx_openal.cpp +++ b/src/audio/sfx_openal.cpp @@ -410,8 +410,8 @@ void SFXOpenAL::reallySetPosition(const Vec3 &position) return; } - alSource3f(m_sound_source, AL_POSITION, (float)position.getX(), - (float)position.getY(), (float)position.getZ()); + alSource3f(m_sound_source, AL_POSITION, position.getX(), + position.getY(), -position.getZ()); if (SFXManager::get()->getListenerPos().distance(position) > m_sound_buffer->getMaxDist())