mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- Changed listener structure to directly contain the sound environment instead
of getting it from the zone in the low level code. SVN r1201 (trunk)
This commit is contained in:
parent
bcbd2162b7
commit
87f0ba0bd2
4 changed files with 8 additions and 6 deletions
|
@ -1,4 +1,6 @@
|
|||
September 6, 2008 (Changes by Graf Zahl)
|
||||
- Changed listener structure to directly contain the sound environment instead
|
||||
of getting it from the zone in the low level code.
|
||||
- Changed sound interface so that all references to game data like actors
|
||||
and sectors are done in s_sound.cpp and not in fmodsound.cpp. Also removed
|
||||
several 'sector' parameters because they were never used inside the sound code.
|
||||
|
|
|
@ -1641,7 +1641,8 @@ static void S_SetListener(SoundListener &listener, AActor *listenactor)
|
|||
listener.position.Y = FIXED2FLOAT(listenactor->y);
|
||||
listener.position.Z = FIXED2FLOAT(listenactor->z);
|
||||
listener.underwater = listenactor->waterlevel == 3;
|
||||
listener.ZoneNumber = listenactor->Sector->ZoneNumber;
|
||||
assert(zones != NULL);
|
||||
listener.Environment = zones[listenactor->Sector->ZoneNumber].Environment;
|
||||
listener.valid = true;
|
||||
}
|
||||
else
|
||||
|
@ -1649,8 +1650,8 @@ static void S_SetListener(SoundListener &listener, AActor *listenactor)
|
|||
listener.angle = 0;
|
||||
listener.position.Zero();
|
||||
listener.velocity.Zero();
|
||||
listener.underwater=false;
|
||||
listener.ZoneNumber=0;
|
||||
listener.underwater = false;
|
||||
listener.Environment = NULL;
|
||||
listener.valid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1791,8 +1791,7 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener)
|
|||
else
|
||||
{
|
||||
underwater = (listener->underwater && snd_waterlp);
|
||||
assert (zones != NULL);
|
||||
env = zones[listener->ZoneNumber].Environment;
|
||||
env = listener->Environment;
|
||||
if (env == NULL)
|
||||
{
|
||||
env = DefaultEnvironments[0];
|
||||
|
|
|
@ -51,7 +51,7 @@ struct SoundListener
|
|||
float angle;
|
||||
bool underwater;
|
||||
bool valid;
|
||||
int ZoneNumber;
|
||||
ReverbContainer *Environment;
|
||||
};
|
||||
|
||||
class SoundStream
|
||||
|
|
Loading…
Reference in a new issue