mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 12:32:13 +00:00
- Duke: Clean up player/actor accesses in dokneeattack()
.
This commit is contained in:
parent
2ff4aaf6b8
commit
0749a65c81
4 changed files with 5 additions and 6 deletions
|
@ -98,7 +98,7 @@ int wakeup(DDukeActor* sn, DDukePlayer* const p);
|
||||||
|
|
||||||
|
|
||||||
int timedexit(int snum);
|
int timedexit(int snum);
|
||||||
void dokneeattack(int snum);
|
void dokneeattack(DDukePlayer* const p);
|
||||||
int endoflevel(int snum);
|
int endoflevel(int snum);
|
||||||
void playerisdead(int snum, int psectlotag, double fz, double cz);
|
void playerisdead(int snum, int psectlotag, double fz, double cz);
|
||||||
void footprints(int snum);
|
void footprints(int snum);
|
||||||
|
|
|
@ -362,9 +362,8 @@ DDukeActor* aim_(DDukeActor* actor, DDukeActor* weapon, double aimangle, bool* b
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void dokneeattack(int snum)
|
void dokneeattack(DDukePlayer* const p)
|
||||||
{
|
{
|
||||||
auto p = getPlayer(snum);
|
|
||||||
auto pact = p->GetActor();
|
auto pact = p->GetActor();
|
||||||
|
|
||||||
if (p->knee_incs > 0)
|
if (p->knee_incs > 0)
|
||||||
|
@ -393,7 +392,7 @@ void dokneeattack(int snum)
|
||||||
if (p->actorsqu->isPlayer())
|
if (p->actorsqu->isPlayer())
|
||||||
{
|
{
|
||||||
quickkill(getPlayer(p->actorsqu->PlayerIndex()));
|
quickkill(getPlayer(p->actorsqu->PlayerIndex()));
|
||||||
getPlayer(p->actorsqu->PlayerIndex())->frag_ps = snum;
|
getPlayer(p->actorsqu->PlayerIndex())->frag_ps = p->pnum;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1955,7 +1955,7 @@ HORIZONLY:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dokneeattack(snum);
|
dokneeattack(p);
|
||||||
|
|
||||||
if (fi.doincrements(p)) return;
|
if (fi.doincrements(p)) return;
|
||||||
|
|
||||||
|
|
|
@ -2908,7 +2908,7 @@ HORIZONLY:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dokneeattack(snum);
|
dokneeattack(p);
|
||||||
|
|
||||||
|
|
||||||
if (fi.doincrements(p)) return;
|
if (fi.doincrements(p)) return;
|
||||||
|
|
Loading…
Reference in a new issue