Fix crash in Shadow Warrior when player dies

This commit is contained in:
Simon 2023-01-29 19:18:01 +00:00 committed by Mitchell Richters
parent 5fd4fbfde5
commit e28088380f

View file

@ -537,7 +537,8 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
{
auto act = ((PLAYER*)source)->actor;
if (act) vPos = act->getPosWithOffsetZ();
else vPos = pp->actor->getPosWithOffsetZ();
else if (pp->actor)
vPos = pp->actor->getPosWithOffsetZ();
}
pancheck = true;
FVector3 npos = GetSoundPos(vPos);