mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 15:11:04 +00:00
- SW: Wrap calls that add to PLAYER::PlayerNowPosition
.
This commit is contained in:
parent
11f9d82239
commit
964557ab6b
5 changed files with 8 additions and 4 deletions
|
@ -737,6 +737,10 @@ struct PLAYER
|
|||
{
|
||||
PlayerNowPosition = val;
|
||||
}
|
||||
void posAdd(const DVector2& val)
|
||||
{
|
||||
PlayerNowPosition += val;
|
||||
}
|
||||
};
|
||||
|
||||
extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
||||
|
|
|
@ -207,7 +207,7 @@ int RectClipMove(PLAYER* pp, DVector2* qpos)
|
|||
//Given the 4 points: x[4], y[4]
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->PlayerNowPosition += pvect;
|
||||
pp->posAdd(pvect);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2165,7 +2165,7 @@ void DoPlayerMove(PLAYER* pp)
|
|||
{
|
||||
pp->PlayerPrevPosition.XY() = pp->posXY();
|
||||
}
|
||||
pp->PlayerNowPosition += pp->vect;
|
||||
pp->posAdd(pp->vect);
|
||||
updatesector(pp->PlayerNowPosition, §);
|
||||
if (sect != nullptr)
|
||||
pp->cursector = sect;
|
||||
|
|
|
@ -1543,7 +1543,7 @@ void PreMapCombineFloors(void)
|
|||
{
|
||||
if (itsect == dasect)
|
||||
{
|
||||
pp->PlayerNowPosition += dv;
|
||||
pp->posAdd(dv);
|
||||
pp->PlayerPrevPosition.XY() = pp->PlayerOldPosition.XY() = pp->posXY();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1487,7 +1487,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
|
|||
pp->RevolveDeltaAng = nullAngle;
|
||||
}
|
||||
|
||||
pp->PlayerNowPosition += move;
|
||||
pp->posAdd(move);
|
||||
|
||||
if ((sop->flags & SOBJ_DONT_ROTATE))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue