mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Clean up player/actor accesses in timedexit()
.
This commit is contained in:
parent
c7c63413ce
commit
2197128dc4
4 changed files with 4 additions and 5 deletions
|
@ -97,7 +97,7 @@ int madenoise(DDukePlayer* const p);
|
||||||
int wakeup(DDukeActor* sn, DDukePlayer* const p);
|
int wakeup(DDukeActor* sn, DDukePlayer* const p);
|
||||||
|
|
||||||
|
|
||||||
int timedexit(int snum);
|
int timedexit(DDukePlayer* const p);
|
||||||
void dokneeattack(DDukePlayer* const p);
|
void dokneeattack(DDukePlayer* const p);
|
||||||
int endoflevel(DDukePlayer* const p);
|
int endoflevel(DDukePlayer* const p);
|
||||||
void playerisdead(DDukePlayer* const p, int psectlotag, double fz, double cz);
|
void playerisdead(DDukePlayer* const p, int psectlotag, double fz, double cz);
|
||||||
|
|
|
@ -647,9 +647,8 @@ int endoflevel(DDukePlayer* const p)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int timedexit(int snum)
|
int timedexit(DDukePlayer* const p)
|
||||||
{
|
{
|
||||||
auto p = getPlayer(snum);
|
|
||||||
p->timebeforeexit--;
|
p->timebeforeexit--;
|
||||||
if (p->timebeforeexit == 26 * 5)
|
if (p->timebeforeexit == 26 * 5)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1631,7 +1631,7 @@ void processinput_d(int snum)
|
||||||
|
|
||||||
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
||||||
{
|
{
|
||||||
if (timedexit(snum))
|
if (timedexit(p))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2443,7 +2443,7 @@ void processinput_r(int snum)
|
||||||
|
|
||||||
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
if (p->timebeforeexit > 1 && p->last_extra > 0)
|
||||||
{
|
{
|
||||||
if (timedexit(snum))
|
if (timedexit(p))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue