mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- fixed sound listener angle for the remote control case.
It was taking the angle of the rotating sector object instead of the angle from the listener's position to it.
This commit is contained in:
parent
498abf25f3
commit
8abd67a3b1
1 changed files with 12 additions and 1 deletions
|
@ -597,7 +597,18 @@ void GameInterface::UpdateSounds(void)
|
|||
PLAYERp pp = Player + screenpeek;
|
||||
SoundListener listener;
|
||||
|
||||
listener.angle = float(-pp->angle.ang.asbuild() * BAngRadian); // Build uses a period of 2048.
|
||||
binangle tang;
|
||||
if (pp->sop_remote)
|
||||
{
|
||||
auto rsp = &pp->remoteActor->s();
|
||||
if (TEST_BOOL1(rsp))
|
||||
tang = buildang(rsp->ang);
|
||||
else
|
||||
tang = bvectangbam(pp->sop_remote->xmid - pp->posx, pp->sop_remote->ymid - pp->posy);
|
||||
}
|
||||
else tang = pp->angle.ang;
|
||||
|
||||
listener.angle = float(-tang.asbuild() * BAngRadian); // Build uses a period of 2048.
|
||||
listener.velocity.Zero();
|
||||
listener.position = GetSoundPos(&pp->pos);
|
||||
listener.underwater = false;
|
||||
|
|
Loading…
Reference in a new issue