- SW: Remove PLAYER::posAdd().

This commit is contained in:
Mitchell Richters 2022-11-23 18:26:24 +11:00 committed by Christoph Oelckers
parent 7eba7aacbd
commit be06582062
5 changed files with 4 additions and 8 deletions

View file

@ -1891,10 +1891,6 @@ struct PLAYER
}
void posAdd(const DVector2& val)
{
actor->spr.pos += val;
}
DVector3 posGet()
{
return actor->spr.pos.plusZ(actor->viewzoffset);

View file

@ -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->posAdd(pvect);
pp->actor->spr.pos.XY() += pvect;
return true;
}

View file

@ -2136,7 +2136,7 @@ void DoPlayerMove(PLAYER* pp)
{
actor->backupvec2();
}
pp->posAdd(pp->vect);
actor->spr.pos.XY() += pp->vect;
updatesector(pp->posGet(), &sect);
if (sect != nullptr)
pp->cursector = sect;

View file

@ -1543,7 +1543,7 @@ void PreMapCombineFloors(void)
{
if (itsect == dasect)
{
pp->posAdd(dv);
pp->actor->spr.pos.XY() += dv;
pp->posoldXY() = pp->actor->spr.pos.XY();
pp->actor->backupvec2();
break;

View file

@ -1487,7 +1487,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
pp->RevolveDeltaAng = nullAngle;
}
pp->posAdd(move);
pp->actor->spr.pos.XY() += move;
if ((sop->flags & SOBJ_DONT_ROTATE))
{