mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- SW: Wrap calls to PLAYER::PlayerOldPosition.XY()
.
This commit is contained in:
parent
f711355f2f
commit
9ab5fd0801
3 changed files with 9 additions and 4 deletions
|
@ -764,6 +764,11 @@ struct PLAYER
|
|||
{
|
||||
return PlayerPrevPosition;
|
||||
}
|
||||
|
||||
DVector2& posoldXY()
|
||||
{
|
||||
return PlayerOldPosition.XY();
|
||||
}
|
||||
};
|
||||
|
||||
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
||||
|
|
|
@ -1314,7 +1314,7 @@ void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang)
|
|||
pp->angle.ang = pp->angle.oang = ang;
|
||||
pp->posSet(pos.plusZ(-PLAYER_HEIGHTF));
|
||||
pp->posprevSet(pos.plusZ(-PLAYER_HEIGHTF));
|
||||
pp->PlayerOldPosition.XY() = pp->posXY();
|
||||
pp->posoldXY() = pp->posXY();
|
||||
|
||||
updatesector(pp->posGet(), &pp->cursector);
|
||||
pp->Flags2 |= (PF2_TELEPORTED);
|
||||
|
@ -1328,7 +1328,7 @@ void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang)
|
|||
|
||||
void DoPlayerTeleportToOffset(PLAYER* pp)
|
||||
{
|
||||
pp->PlayerOldPosition.XY() = pp->posprevXY() = pp->posXY();
|
||||
pp->posoldXY() = pp->posprevXY() = pp->posXY();
|
||||
|
||||
updatesector(pp->posGet(), &pp->cursector);
|
||||
pp->Flags2 |= (PF2_TELEPORTED);
|
||||
|
@ -1703,7 +1703,7 @@ void DoPlayerBob(PLAYER* pp)
|
|||
{
|
||||
double amt;
|
||||
|
||||
double dist = (pp->posXY() - pp->PlayerOldPosition.XY()).Length();
|
||||
double dist = (pp->posXY() - pp->posoldXY()).Length();
|
||||
|
||||
if (dist > 32)
|
||||
dist = 0;
|
||||
|
|
|
@ -1544,7 +1544,7 @@ void PreMapCombineFloors(void)
|
|||
if (itsect == dasect)
|
||||
{
|
||||
pp->posAdd(dv);
|
||||
pp->posprevXY() = pp->PlayerOldPosition.XY() = pp->posXY();
|
||||
pp->posprevXY() = pp->posoldXY() = pp->posXY();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue