mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: Clean up player/actor accesses in movement()
.
This commit is contained in:
parent
7dc0bde2be
commit
58a87b658c
2 changed files with 4 additions and 6 deletions
|
@ -641,10 +641,9 @@ static void operateJetpack(DDukePlayer* const p, ESyncBits actions, int psectlot
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void movement(int snum, ESyncBits actions, sectortype* psect, double floorz, double ceilingz, int shrunk, double truefdist, int psectlotag)
|
static void movement(DDukePlayer* const p, ESyncBits actions, sectortype* psect, double floorz, double ceilingz, int shrunk, double truefdist, int psectlotag)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
auto p = getPlayer(snum);
|
|
||||||
auto pact = p->GetActor();
|
auto pact = p->GetActor();
|
||||||
|
|
||||||
if (p->airleft != 15 * 26)
|
if (p->airleft != 15 * 26)
|
||||||
|
@ -1700,7 +1699,7 @@ void processinput_d(int snum)
|
||||||
}
|
}
|
||||||
else if (psectlotag != ST_2_UNDERWATER)
|
else if (psectlotag != ST_2_UNDERWATER)
|
||||||
{
|
{
|
||||||
movement(snum, actions, psectp, floorz, ceilingz, shrunk, truefdist, psectlotag);
|
movement(p, actions, psectp, floorz, ceilingz, shrunk, truefdist, psectlotag);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->psectlotag = psectlotag;
|
p->psectlotag = psectlotag;
|
||||||
|
|
|
@ -1112,9 +1112,8 @@ static void onBoat(int snum, ESyncBits &actions)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void movement(int snum, ESyncBits actions, sectortype* psect, double floorz, double ceilingz, int shrunk, double truefdist, int psectlotag)
|
static void movement(DDukePlayer* const p, ESyncBits actions, sectortype* psect, double floorz, double ceilingz, int shrunk, double truefdist, int psectlotag)
|
||||||
{
|
{
|
||||||
auto p = getPlayer(snum);
|
|
||||||
auto pact = p->GetActor();
|
auto pact = p->GetActor();
|
||||||
|
|
||||||
if (p->airleft != 15 * 26)
|
if (p->airleft != 15 * 26)
|
||||||
|
@ -2528,7 +2527,7 @@ void processinput_r(int snum)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
movement(snum, actions, psectp, floorz, ceilingz, shrunk, truefdist, psectlotag);
|
movement(p, actions, psectp, floorz, ceilingz, shrunk, truefdist, psectlotag);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->psectlotag = psectlotag;
|
p->psectlotag = psectlotag;
|
||||||
|
|
Loading…
Reference in a new issue