mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- SW: Replace PLAYERstruct
ly
with LadderPosition.Y
calls.
This commit is contained in:
parent
a18fc5b66f
commit
05de974080
4 changed files with 9 additions and 11 deletions
|
@ -671,7 +671,6 @@ struct PLAYERstruct
|
||||||
|
|
||||||
sectortype* LadderSector;
|
sectortype* LadderSector;
|
||||||
vec3_t LadderPosition; // ladder x and y
|
vec3_t LadderPosition; // ladder x and y
|
||||||
int ly; // ladder x and y
|
|
||||||
int16_t JumpDuration;
|
int16_t JumpDuration;
|
||||||
int16_t WadeDepth;
|
int16_t WadeDepth;
|
||||||
int16_t bob_amt;
|
int16_t bob_amt;
|
||||||
|
|
|
@ -3183,15 +3183,15 @@ void DoPlayerClimb(PLAYERp pp)
|
||||||
pp->pos.X = pp->LadderPosition.X;
|
pp->pos.X = pp->LadderPosition.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pp->pos.Y != pp->ly)
|
if (pp->pos.Y != pp->LadderPosition.Y)
|
||||||
{
|
{
|
||||||
if (pp->pos.Y < pp->ly)
|
if (pp->pos.Y < pp->LadderPosition.Y)
|
||||||
pp->pos.Y += ADJ_AMT;
|
pp->pos.Y += ADJ_AMT;
|
||||||
else if (pp->pos.Y > pp->ly)
|
else if (pp->pos.Y > pp->LadderPosition.Y)
|
||||||
pp->pos.Y -= ADJ_AMT;
|
pp->pos.Y -= ADJ_AMT;
|
||||||
|
|
||||||
if (labs(pp->pos.Y - pp->ly) <= ADJ_AMT)
|
if (labs(pp->pos.Y - pp->LadderPosition.Y) <= ADJ_AMT)
|
||||||
pp->pos.Y = pp->ly;
|
pp->pos.Y = pp->LadderPosition.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sprite
|
// sprite
|
||||||
|
@ -3347,7 +3347,7 @@ void DoPlayerClimb(PLAYERp pp)
|
||||||
// the sprite
|
// the sprite
|
||||||
|
|
||||||
pp->LadderPosition.X = lActor->spr.pos.X + nx * 5;
|
pp->LadderPosition.X = lActor->spr.pos.X + nx * 5;
|
||||||
pp->ly = lActor->spr.pos.Y + ny * 5;
|
pp->LadderPosition.Y = lActor->spr.pos.Y + ny * 5;
|
||||||
|
|
||||||
pp->angle.settarget(lActor->spr.ang + 1024);
|
pp->angle.settarget(lActor->spr.ang + 1024);
|
||||||
}
|
}
|
||||||
|
@ -3729,7 +3729,7 @@ bool PlayerOnLadder(PLAYERp pp)
|
||||||
// the sprite
|
// the sprite
|
||||||
|
|
||||||
pp->LadderPosition.X = lActor->spr.pos.X + nx * 5;
|
pp->LadderPosition.X = lActor->spr.pos.X + nx * 5;
|
||||||
pp->ly = lActor->spr.pos.Y + ny * 5;
|
pp->LadderPosition.Y = lActor->spr.pos.Y + ny * 5;
|
||||||
|
|
||||||
pp->angle.settarget(lActor->spr.ang + 1024);
|
pp->angle.settarget(lActor->spr.ang + 1024);
|
||||||
|
|
||||||
|
@ -7119,7 +7119,7 @@ DEFINE_FIELD_X(SWPlayer, PLAYERstruct, RevolveDeltaAng)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, pnum)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, pnum)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, LadderSector)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, LadderSector)
|
||||||
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, lx)
|
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, lx)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ly)
|
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ly)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, JumpDuration)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, JumpDuration)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WadeDepth)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WadeDepth)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bob_amt)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bob_amt)
|
||||||
|
|
|
@ -501,7 +501,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, P
|
||||||
("pnum", w.pnum)
|
("pnum", w.pnum)
|
||||||
("LadderSector", w.LadderSector)
|
("LadderSector", w.LadderSector)
|
||||||
("lx", w.LadderPosition.X)
|
("lx", w.LadderPosition.X)
|
||||||
("ly", w.ly)
|
("ly", w.LadderPosition.Y)
|
||||||
("JumpDuration", w.JumpDuration)
|
("JumpDuration", w.JumpDuration)
|
||||||
("WadeDepth", w.WadeDepth)
|
("WadeDepth", w.WadeDepth)
|
||||||
("bob_amt", w.bob_amt)
|
("bob_amt", w.bob_amt)
|
||||||
|
|
|
@ -226,7 +226,6 @@ struct SWPlayer native
|
||||||
native int16 pnum; // carry along the player number
|
native int16 pnum; // carry along the player number
|
||||||
|
|
||||||
//native int16 LadderSector;
|
//native int16 LadderSector;
|
||||||
native int ly; // ladder x and y
|
|
||||||
native int16 JumpDuration;
|
native int16 JumpDuration;
|
||||||
native int16 WadeDepth;
|
native int16 WadeDepth;
|
||||||
native int16 bob_amt;
|
native int16 bob_amt;
|
||||||
|
|
Loading…
Reference in a new issue