mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- SW: Replace PLAYERstruct
RevolveX
with Revolve.X
calls.
This commit is contained in:
parent
05de974080
commit
acc11f34bf
5 changed files with 10 additions and 9 deletions
|
@ -663,7 +663,8 @@ struct PLAYERstruct
|
|||
fixed_t recoil_ohorizoff, recoil_horizoff;
|
||||
|
||||
int oldposx,oldposy,oldposz;
|
||||
int RevolveX, RevolveY;
|
||||
vec3_t Revolve;
|
||||
int RevolveY;
|
||||
int16_t RevolveDeltaAng;
|
||||
binangle RevolveAng;
|
||||
|
||||
|
|
|
@ -7113,7 +7113,7 @@ DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_ohorizoff)
|
|||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposx)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposy)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposz)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, RevolveX)
|
||||
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Revolve.X)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, RevolveY)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, RevolveDeltaAng)
|
||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, pnum)
|
||||
|
|
|
@ -492,7 +492,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, P
|
|||
("oldposx", w.oldposx)
|
||||
("oldposy", w.oldposy)
|
||||
("oldposz", w.oldposz)
|
||||
("revolvex", w.RevolveX)
|
||||
("revolvex", w.Revolve.X)
|
||||
("revolvey", w.RevolveY)
|
||||
("RevolveDeltaAng", w.RevolveDeltaAng)
|
||||
("RevolveAng", w.RevolveAng)
|
||||
|
|
|
@ -733,7 +733,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECTp sop)
|
|||
if (pp->posx > xlow && pp->posx < xhigh && pp->posy > ylow && pp->posy < yhigh)
|
||||
{
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveX = pp->posx;
|
||||
pp->Revolve.X = pp->pos.X;
|
||||
pp->RevolveY = pp->posy;
|
||||
pp->RevolveDeltaAng = 0;
|
||||
pp->Flags |= (PF_PLAYER_RIDING);
|
||||
|
@ -1524,7 +1524,7 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
pp->Flags |= (PF_PLAYER_RIDING);
|
||||
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveX = pp->pos.X;
|
||||
pp->Revolve.X = pp->pos.X;
|
||||
pp->RevolveY = pp->pos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
|
@ -1548,7 +1548,7 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
// moving then you
|
||||
// know where he was last
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveX = pp->pos.X;
|
||||
pp->Revolve.X = pp->pos.X;
|
||||
pp->RevolveY = pp->pos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
|
@ -1559,7 +1559,7 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
// Player is NOT moving
|
||||
|
||||
// Move saved x&y variables
|
||||
pp->RevolveX += nx;
|
||||
pp->Revolve.X += nx;
|
||||
pp->RevolveY += ny;
|
||||
|
||||
// Last known angle is now adjusted by the delta angle
|
||||
|
@ -1569,7 +1569,7 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
// increment Players delta angle
|
||||
pp->RevolveDeltaAng = NORM_ANGLE(pp->RevolveDeltaAng + GlobSpeedSO);
|
||||
|
||||
rotatepoint(sop->pmid.vec2, *(vec2_t *)&pp->RevolveX, pp->RevolveDeltaAng, &pp->pos.vec2);
|
||||
rotatepoint(sop->pmid.vec2, *(vec2_t *)&pp->Revolve.X, pp->RevolveDeltaAng, &pp->pos.vec2);
|
||||
|
||||
// THIS WAS CAUSING PROLEMS!!!!
|
||||
// Sectors are still being manipulated so you can end up in a void (-1) sector
|
||||
|
|
|
@ -220,7 +220,7 @@ struct SWPlayer native
|
|||
native int recoil_horizoff;
|
||||
|
||||
native int oldposx,oldposy,oldposz;
|
||||
native int RevolveX, RevolveY;
|
||||
native int RevolveY;
|
||||
native int16 RevolveDeltaAng;
|
||||
|
||||
native int16 pnum; // carry along the player number
|
||||
|
|
Loading…
Reference in a new issue