mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +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. # Conflicts: # source/sw/src/track.cpp
This commit is contained in:
parent
43ec16eb55
commit
ac8a7ecfbd
2 changed files with 11 additions and 5 deletions
|
@ -2052,11 +2052,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_sadd(pp->RevolveAng, pp->RevolveDeltaAng) & 0x7FFFFFF;
|
||||
pp->oq16ang = pp->q16ang = fix16_sadd(pp->RevolveAng, pp->RevolveDeltaAng) & 0x7FFFFFF;
|
||||
|
||||
UpdatePlayerSprite(pp);
|
||||
}
|
||||
|
@ -1927,6 +1929,7 @@ PlayerPart:
|
|||
pp->SpriteP->z = pp->loz;
|
||||
}
|
||||
}
|
||||
pp->oposz = pp->posz;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue