mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- add_int_ppos_XY
This commit is contained in:
parent
8ff62c5a07
commit
72869304ea
5 changed files with 11 additions and 14 deletions
|
@ -614,6 +614,10 @@ struct PLAYER
|
|||
{
|
||||
__int_ppos.Z += z;
|
||||
}
|
||||
void add_int_ppos_XY(vec2_t z)
|
||||
{
|
||||
__int_ppos.XY() += z;
|
||||
}
|
||||
|
||||
DSWActor* actor; // this may not be a TObjPtr!
|
||||
TObjPtr<DSWActor*> lowActor, highActor;
|
||||
|
|
|
@ -111,8 +111,7 @@ Collision MultiClipMove(PLAYER* pp, int z, int floor_dist)
|
|||
}
|
||||
|
||||
// put posx and y off from offset
|
||||
pp->__int_ppos.X += pos[min_ndx].X - opos[min_ndx].X;
|
||||
pp->__int_ppos.Y += pos[min_ndx].Y - opos[min_ndx].Y;
|
||||
pp->add_int_ppos_XY({ pos[min_ndx].X - opos[min_ndx].X, pos[min_ndx].Y - opos[min_ndx].Y });
|
||||
|
||||
return min_ret;
|
||||
}
|
||||
|
@ -201,8 +200,7 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
//Given the 4 points: x[4], y[4]
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->__int_ppos.X += (pp->vect.X>>14);
|
||||
pp->__int_ppos.Y += (pp->vect.Y>>14);
|
||||
pp->add_int_ppos_XY({ (pp->vect.X >> 14), (pp->vect.Y >> 14) });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -218,8 +216,7 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
}
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->__int_ppos.X -= (pp->vect.Y>>15);
|
||||
pp->__int_ppos.Y += (pp->vect.X>>15);
|
||||
pp->add_int_ppos_XY({ -(pp->vect.Y >> 15), (pp->vect.X >> 15) });
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -234,8 +231,7 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
}
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->__int_ppos.X += (pp->vect.Y>>15);
|
||||
pp->__int_ppos.Y -= (pp->vect.X>>15);
|
||||
pp->add_int_ppos_XY({ (pp->vect.Y >> 15), -(pp->vect.X >> 15) });
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -2038,8 +2038,7 @@ void DoPlayerMove(PLAYER* pp)
|
|||
{
|
||||
pp->__int_popos.XY() = pp->int_ppos().XY();
|
||||
}
|
||||
pp->__int_ppos.X += pp->vect.X >> 14;
|
||||
pp->__int_ppos.Y += pp->vect.Y >> 14;
|
||||
pp->add_int_ppos_XY({ pp->vect.X >> 14, pp->vect.Y >> 14 });
|
||||
updatesector(pp->int_ppos().X, pp->int_ppos().Y, §);
|
||||
if (sect != nullptr)
|
||||
pp->cursector = sect;
|
||||
|
|
|
@ -1469,8 +1469,7 @@ void PreMapCombineFloors(void)
|
|||
{
|
||||
if (itsect == dasect)
|
||||
{
|
||||
pp->__int_ppos.X += dx;
|
||||
pp->__int_ppos.Y += dy;
|
||||
pp->add_int_ppos_XY({ dx, dy });
|
||||
pp->__int_popos.X = pp->__int_poldpos.X = pp->__int_ppos.X;
|
||||
pp->__int_popos.Y = pp->__int_poldpos.Y = pp->__int_ppos.Y;
|
||||
break;
|
||||
|
|
|
@ -1520,8 +1520,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, int nx, int ny)
|
|||
pp->RevolveDeltaAng = nullAngle;
|
||||
}
|
||||
|
||||
pp->__int_ppos.X += nx;
|
||||
pp->__int_ppos.Y += ny;
|
||||
pp->add_int_ppos_XY({ nx, ny });
|
||||
|
||||
if ((sop->flags & SOBJ_DONT_ROTATE))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue