From 6c63ce51e4472a75afd955404cbbe9706a7cdc50 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 18 Mar 2010 21:54:24 +0000 Subject: [PATCH] - Fixed: The listener used a different coordinate system than sounds, which meant that sounds were never made head-relative, so stereo effects would disappear if they were played by the listener. SVN r2231 (trunk) --- src/s_sound.cpp | 4 ++-- src/sound/fmodsound.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 159323d9b..d65cbaf0b 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -1922,8 +1922,8 @@ static void S_SetListener(SoundListener &listener, AActor *listenactor) */ listener.velocity.Zero(); listener.position.X = FIXED2FLOAT(listenactor->x); - listener.position.Y = FIXED2FLOAT(listenactor->y); - listener.position.Z = FIXED2FLOAT(listenactor->z); + listener.position.Y = FIXED2FLOAT(listenactor->z); + listener.position.Z = FIXED2FLOAT(listenactor->y); listener.underwater = listenactor->waterlevel == 3; assert(zones != NULL); listener.Environment = zones[listenactor->Sector->ZoneNumber].Environment; diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index f5b338295..6a480f0f9 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -1994,11 +1994,11 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener) // Set velocity to 0 to prevent crazy doppler shifts just from running. vel.x = listener->velocity.X; - vel.z = listener->velocity.Y; - vel.y = listener->velocity.Z; + vel.y = listener->velocity.Y; + vel.z = listener->velocity.Z; pos.x = listener->position.X; - pos.z = listener->position.Y; - pos.y = listener->position.Z; + pos.y = listener->position.Y; + pos.z = listener->position.Z; float angle = listener->angle; forward.x = cos(angle);