mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- 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)
This commit is contained in:
parent
5ec5d74267
commit
6c63ce51e4
2 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue