mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 10:32:27 +00:00
- Duke: Clean up player/actor accesses in haslock()
.
This commit is contained in:
parent
175b856406
commit
be417e324b
3 changed files with 4 additions and 5 deletions
|
@ -119,7 +119,7 @@ void checkweapons(DDukePlayer* const p);
|
|||
int findotherplayer(int p, double* d);
|
||||
void quickkill(DDukePlayer* p);
|
||||
int setpal(DDukePlayer* p);
|
||||
int haslock(sectortype* sect, int snum);
|
||||
int haslock(sectortype* sect, DDukePlayer* const p);
|
||||
void purplelavacheck(DDukePlayer* p);
|
||||
void addphealth(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)
|
||||
return 0;
|
||||
if (!sectp->lockinfo)
|
||||
|
|
|
@ -368,7 +368,7 @@ void checksectors_r(int snum)
|
|||
if (isactivator(act) || ismasterswitch(act))
|
||||
return;
|
||||
}
|
||||
if (haslock(near.hitSector, snum))
|
||||
if (haslock(near.hitSector, p))
|
||||
operatesectors(near.hitSector, p->GetActor());
|
||||
else
|
||||
{
|
||||
|
@ -389,7 +389,7 @@ void checksectors_r(int snum)
|
|||
if (isactivator(act) || ismasterswitch(act))
|
||||
return;
|
||||
}
|
||||
if (haslock(near.hitSector, snum))
|
||||
if (haslock(near.hitSector, p))
|
||||
operatesectors(p->GetActor()->sector(), p->GetActor());
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue