mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Interpolation fixes for SW:
draw.cpp: Fix the lack of interpolation while walking on a sector object, like the bus roof or the floor of the train in Seppuku Station. track.cpp: Make sure the player's location and angle aren't mistakenly interpolated while standing on a moving sector object as a consequence.
This commit is contained in:
parent
eaefc2576c
commit
cc4f1f21f9
2 changed files with 11 additions and 5 deletions
|
@ -2055,11 +2055,14 @@ drawscreen(PLAYERp pp)
|
|||
// ASSERT(tsectnum >= 0 && tsectnum <= MAXSECTORS);
|
||||
|
||||
if (pp->sop_riding || pp->sop_control)
|
||||
{
|
||||
if (pp->sop_control)
|
||||
{
|
||||
tx = pp->posx;
|
||||
ty = pp->posy;
|
||||
tz = pp->posz;
|
||||
tq16ang = pp->q16ang;
|
||||
}
|
||||
tsectnum = pp->cursectnum;
|
||||
updatesectorz(tx, ty, tz, &tsectnum);
|
||||
}
|
||||
|
|
|
@ -1630,6 +1630,8 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
pp->posx += BOUND_4PIX(nx);
|
||||
pp->posy += BOUND_4PIX(ny);
|
||||
|
||||
pp->oposx = pp->posx;
|
||||
pp->oposy = pp->posy;
|
||||
|
||||
if (TEST(sop->flags, SOBJ_DONT_ROTATE))
|
||||
{
|
||||
|
@ -1674,7 +1676,7 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
|
||||
// New angle is formed by taking last known angle and
|
||||
// adjusting by the delta angle
|
||||
pp->q16ang = fix16_from_int(NORM_ANGLE(pp->RevolveAng + pp->RevolveDeltaAng));
|
||||
pp->oq16ang = pp->q16ang = fix16_from_int(NORM_ANGLE(pp->RevolveAng + pp->RevolveDeltaAng));
|
||||
|
||||
UpdatePlayerSprite(pp);
|
||||
}
|
||||
|
@ -1927,6 +1929,7 @@ PlayerPart:
|
|||
pp->SpriteP->z = pp->loz;
|
||||
}
|
||||
}
|
||||
pp->oposz = pp->posz;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue