mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- SW: Wrap calls to PLAYER::PlayerPrevPosition.XY()
.
This commit is contained in:
parent
82e0e25b7e
commit
bf833fcfa3
3 changed files with 9 additions and 4 deletions
|
@ -745,6 +745,11 @@ struct PLAYER
|
|||
{
|
||||
return PlayerNowPosition;
|
||||
}
|
||||
|
||||
DVector2& posprevXY()
|
||||
{
|
||||
return PlayerPrevPosition.XY();
|
||||
}
|
||||
};
|
||||
|
||||
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
||||
|
|
|
@ -1328,7 +1328,7 @@ void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang)
|
|||
|
||||
void DoPlayerTeleportToOffset(PLAYER* pp)
|
||||
{
|
||||
pp->PlayerOldPosition.XY() = pp->PlayerPrevPosition.XY() = pp->posXY();
|
||||
pp->PlayerOldPosition.XY() = pp->posprevXY() = pp->posXY();
|
||||
|
||||
updatesector(pp->posGet(), &pp->cursector);
|
||||
pp->Flags2 |= (PF2_TELEPORTED);
|
||||
|
@ -2167,7 +2167,7 @@ void DoPlayerMove(PLAYER* pp)
|
|||
auto sect = pp->cursector;
|
||||
if (interpolate_ride)
|
||||
{
|
||||
pp->PlayerPrevPosition.XY() = pp->posXY();
|
||||
pp->posprevXY() = pp->posXY();
|
||||
}
|
||||
pp->posAdd(pp->vect);
|
||||
updatesector(pp->posGet(), §);
|
||||
|
@ -2192,7 +2192,7 @@ void DoPlayerMove(PLAYER* pp)
|
|||
|
||||
if (interpolate_ride)
|
||||
{
|
||||
pp->PlayerPrevPosition.XY() = pp->posXY();
|
||||
pp->posprevXY() = pp->posXY();
|
||||
}
|
||||
|
||||
auto save_cstat = actor->spr.cstat;
|
||||
|
|
|
@ -1544,7 +1544,7 @@ void PreMapCombineFloors(void)
|
|||
if (itsect == dasect)
|
||||
{
|
||||
pp->posAdd(dv);
|
||||
pp->PlayerPrevPosition.XY() = pp->PlayerOldPosition.XY() = pp->posXY();
|
||||
pp->posprevXY() = pp->PlayerOldPosition.XY() = pp->posXY();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue