mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Clean up player/actor accesses in endoflevel()
.
This commit is contained in:
parent
55c150845c
commit
c7c63413ce
4 changed files with 4 additions and 6 deletions
|
@ -99,7 +99,7 @@ int wakeup(DDukeActor* sn, DDukePlayer* const p);
|
|||
|
||||
int timedexit(int snum);
|
||||
void dokneeattack(DDukePlayer* const p);
|
||||
int endoflevel(int snum);
|
||||
int endoflevel(DDukePlayer* const p);
|
||||
void playerisdead(DDukePlayer* const p, int psectlotag, double fz, double cz);
|
||||
void footprints(DDukePlayer* const p);
|
||||
int makepainsounds(DDukePlayer* const p, int type);
|
||||
|
|
|
@ -620,10 +620,8 @@ void playerisdead(DDukePlayer* const p, int psectlotag, double floorz, double ce
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int endoflevel(int snum)
|
||||
int endoflevel(DDukePlayer* const p)
|
||||
{
|
||||
auto p = getPlayer(snum);
|
||||
|
||||
// the fist puching the end-of-level thing...
|
||||
p->ofist_incs = p->fist_incs;
|
||||
p->fist_incs++;
|
||||
|
|
|
@ -1626,7 +1626,7 @@ void processinput_d(int snum)
|
|||
|
||||
if (p->fist_incs)
|
||||
{
|
||||
if (endoflevel(snum)) return;
|
||||
if (endoflevel(p)) return;
|
||||
}
|
||||
|
||||
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
||||
|
|
|
@ -2438,7 +2438,7 @@ void processinput_r(int snum)
|
|||
|
||||
if (p->fist_incs)
|
||||
{
|
||||
if (endoflevel(snum)) return;
|
||||
if (endoflevel(p)) return;
|
||||
}
|
||||
|
||||
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
||||
|
|
Loading…
Reference in a new issue