mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 12:32:13 +00:00
- Duke: Clean up player/actor accesses in haslock()
.
This commit is contained in:
parent
31a43cdd79
commit
f80290d80e
3 changed files with 4 additions and 5 deletions
|
@ -119,7 +119,7 @@ void checkweapons(DDukePlayer* const p);
|
||||||
int findotherplayer(int p, double* d);
|
int findotherplayer(int p, double* d);
|
||||||
void quickkill(DDukePlayer* p);
|
void quickkill(DDukePlayer* p);
|
||||||
int setpal(DDukePlayer* p);
|
int setpal(DDukePlayer* p);
|
||||||
int haslock(sectortype* sect, int snum);
|
int haslock(sectortype* sect, DDukePlayer* const p);
|
||||||
void purplelavacheck(DDukePlayer* p);
|
void purplelavacheck(DDukePlayer* p);
|
||||||
void addphealth(DDukePlayer* p, int amount, bool bigitem);
|
void addphealth(DDukePlayer* p, int amount, bool bigitem);
|
||||||
int playereat(DDukePlayer* p, int amount, bool bigitem);
|
int playereat(DDukePlayer* p, int amount, bool bigitem);
|
||||||
|
|
|
@ -999,9 +999,8 @@ bool movementBlocked(DDukePlayer *p)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
int haslock(sectortype* sectp, int snum)
|
int haslock(sectortype* sectp, DDukePlayer* const p)
|
||||||
{
|
{
|
||||||
auto p = getPlayer(snum);
|
|
||||||
if (!sectp)
|
if (!sectp)
|
||||||
return 0;
|
return 0;
|
||||||
if (!sectp->lockinfo)
|
if (!sectp->lockinfo)
|
||||||
|
|
|
@ -368,7 +368,7 @@ void checksectors_r(int snum)
|
||||||
if (isactivator(act) || ismasterswitch(act))
|
if (isactivator(act) || ismasterswitch(act))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (haslock(near.hitSector, snum))
|
if (haslock(near.hitSector, p))
|
||||||
operatesectors(near.hitSector, p->GetActor());
|
operatesectors(near.hitSector, p->GetActor());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -389,7 +389,7 @@ void checksectors_r(int snum)
|
||||||
if (isactivator(act) || ismasterswitch(act))
|
if (isactivator(act) || ismasterswitch(act))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (haslock(near.hitSector, snum))
|
if (haslock(near.hitSector, p))
|
||||||
operatesectors(p->GetActor()->sector(), p->GetActor());
|
operatesectors(p->GetActor()->sector(), p->GetActor());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue