mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-23 00:11:03 +00:00
- fixed two bugs that revealed themselves after fully migrating to the actor system.
This commit is contained in:
parent
46ecd2b652
commit
de61f6d746
2 changed files with 6 additions and 4 deletions
|
@ -114,7 +114,8 @@ void GameInterface::clearlocalinputstate()
|
|||
|
||||
static void UpdatePlayerSpriteAngle(PLAYER& plr)
|
||||
{
|
||||
plr.actor()->s().ang = plr.angle.ang.asbuild();
|
||||
if (plr.actor())
|
||||
plr.actor()->s().ang = plr.angle.ang.asbuild();
|
||||
}
|
||||
|
||||
void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
||||
|
|
|
@ -138,6 +138,9 @@ void GameInterface::UpdateSounds()
|
|||
return false;
|
||||
});
|
||||
|
||||
listener.underwater = false;
|
||||
listener.Environment = 0;
|
||||
|
||||
if (player[pyrn].actor() != nullptr)
|
||||
{
|
||||
listener.angle = float(-FixedToFloat(player[pyrn].angle.ang.asq16()) * pi::pi() / 1024); // Build uses a period of 2048.
|
||||
|
@ -145,16 +148,14 @@ void GameInterface::UpdateSounds()
|
|||
vec3_t ppos{ player[pyrn].x, player[pyrn].y, player[pyrn].z };
|
||||
listener.position = GetSoundPos(&ppos);
|
||||
listener.valid = true;
|
||||
listener.ListenerObject = &player[pyrn].actor()->s();
|
||||
}
|
||||
else
|
||||
{
|
||||
listener.position.Zero();
|
||||
listener.valid = false;
|
||||
}
|
||||
listener.underwater = false;
|
||||
listener.Environment = 0;
|
||||
|
||||
listener.ListenerObject = &player[pyrn].actor()->s();
|
||||
soundEngine->SetListener(listener);
|
||||
soundEngine->UpdateSounds(I_GetTime());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue