mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 11:11:16 +00:00
- SW: Apply same fix to DoPlayerClimb()
.
This commit is contained in:
parent
7e1e447f98
commit
774c7795b1
2 changed files with 5 additions and 16 deletions
|
@ -784,20 +784,14 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
|
|||
if (pp->Flags & (PF_VIEW_FROM_OUTSIDE))
|
||||
tsp->cstat |= (CSTAT_SPRITE_TRANSLUCENT);
|
||||
|
||||
DVector3 pos;
|
||||
auto pos = DVector3(pp->si.XY(), tsp->pos.Z + pp->si.Z + pp->getViewHeightDiff());
|
||||
|
||||
if (pp->Flags & (PF_CLIMBING))
|
||||
{
|
||||
// move sprite forward some so he looks like he's
|
||||
// climbing
|
||||
pos.XY() = pp->si.XY() + tsp->Angles.Yaw.ToVector() * 13;
|
||||
// move sprite forward some so he looks like he's climbing
|
||||
pos.XY() += tsp->Angles.Yaw.ToVector() * 13;
|
||||
pos.Z -= PLAYER_HEIGHTF - 17.;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.X = pp->si.X;
|
||||
pos.Y = pp->si.Y;
|
||||
}
|
||||
|
||||
pos.Z = tsp->pos.Z + pp->si.Z + pp->getViewHeightDiff();
|
||||
|
||||
if ((pp->Flags & PF_DEAD) && pos.Z > pp->actor->user.loz - pp->actor->user.floor_dist)
|
||||
{
|
||||
|
|
|
@ -1861,10 +1861,6 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
{
|
||||
pp->height = PLAYER_DIVE_HEIGHTF;
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerClimb)
|
||||
{
|
||||
pp->height = 17;
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerFly)
|
||||
{
|
||||
// bobbing and sprite position taken care of in DoPlayerFly
|
||||
|
@ -3425,7 +3421,6 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
}
|
||||
|
||||
// setsprite to players location
|
||||
plActor->spr.pos.Z = pp->actor->getOffsetZ() + PLAYER_HEIGHTF;
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
|
||||
if (!SyncInput())
|
||||
|
|
Loading…
Reference in a new issue