- SW: Wrap calls that set PLAYER::PlayerPrevPosition.Z.

This commit is contained in:
Mitchell Richters 2022-11-16 14:04:19 +11:00 committed by Christoph Oelckers
parent bf833fcfa3
commit 2d351b2c28
2 changed files with 7 additions and 2 deletions

View file

@ -750,6 +750,11 @@ struct PLAYER
{
return PlayerPrevPosition.XY();
}
void posprevZset(const double val)
{
PlayerPrevPosition.Z = val;
}
};
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];

View file

@ -2221,7 +2221,7 @@ void DoPlayerMove(PLAYER* pp)
if (interpolate_ride)
{
pp->PlayerPrevPosition.Z = pp->posZget();
pp->posprevZset(pp->posZget());
pp->angle.backup();
}
@ -7357,7 +7357,7 @@ void PlayerSpawnPosition(PLAYER* pp)
if (pp->posZget() > fz - PLAYER_HEIGHTF)
{
pp->posZset(fz - PLAYER_HEIGHTF);
pp->PlayerPrevPosition.Z = pp->posZget();
pp->posprevZset(pp->posZget());
}
}