mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed some initialization problems with sound.
* a position-less sound did not get the listener's position attached. * an unattached sound mixed up y and z coordinates.
This commit is contained in:
parent
fadc7d650d
commit
32c32ea739
1 changed files with 3 additions and 1 deletions
|
@ -665,6 +665,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
if (listener != NULL)
|
||||
{
|
||||
listenpos = listener->Pos();
|
||||
*pos = listener->SoundPos();
|
||||
pgroup = listener->Sector->PortalGroup;
|
||||
}
|
||||
else
|
||||
|
@ -1276,7 +1277,8 @@ void S_Sound (const FPolyObj *poly, int channel, FSoundID sound_id, float volume
|
|||
|
||||
void S_Sound(const DVector3 &pos, int channel, FSoundID sound_id, float volume, float attenuation)
|
||||
{
|
||||
FVector3 p((float)pos.X, (float)pos.Y, (float)pos.Z);
|
||||
// The sound system switches Y and Z around.
|
||||
FVector3 p((float)pos.X, (float)pos.Z, (float)pos.Y);
|
||||
S_StartSound (NULL, NULL, NULL, &p, channel, sound_id, volume, attenuation);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue