mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-30 20:51:02 +00:00
- Exhumed: Use player pointer in AIPlayer::Damage()
.
This commit is contained in:
parent
f0b9937ec7
commit
d270099aa7
1 changed files with 4 additions and 6 deletions
|
@ -580,17 +580,15 @@ void AIPlayer::Draw(RunListEvent* ev)
|
|||
|
||||
void AIPlayer::RadialDamage(RunListEvent* ev)
|
||||
{
|
||||
int nPlayer = RunData[ev->nRun].nObjIndex;
|
||||
const int nPlayer = RunData[ev->nRun].nObjIndex;
|
||||
assert(nPlayer >= 0 && nPlayer < kMaxPlayers);
|
||||
|
||||
auto pPlayerActor = PlayerList[nPlayer].pActor;
|
||||
const auto pPlayer = &PlayerList[nPlayer];
|
||||
|
||||
if (PlayerList[nPlayer].nHealth <= 0)
|
||||
{
|
||||
if (pPlayer->nHealth <= 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ev->nDamage = runlist_CheckRadialDamage(pPlayerActor);
|
||||
ev->nDamage = runlist_CheckRadialDamage(pPlayer->pActor);
|
||||
Damage(ev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue