diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 4b9bf4c05..017919a84 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -2650,6 +2650,13 @@ DoPlayerMove(PLAYERp pp) int friction; int save_cstat; int push_ret = 0; + + // If SO interpolation is disabled, make sure the player's aiming, + // turning and movement still get appropriately interpolated. + // We do this from here instead of MovePlayer, covering the case + // the player gets pushed by a wall (e.g., on the boat in level 5). + SWBOOL interpolate_ride = pp->sop_riding && (!gs.InterpolateSO || CommEnabled); + void SlipSlope(PLAYERp pp); SlipSlope(pp); @@ -2704,6 +2711,11 @@ DoPlayerMove(PLAYERp pp) if (TEST(pp->Flags, PF_CLIP_CHEAT)) { short sectnum=pp->cursectnum; + if (interpolate_ride) + { + pp->oposx = pp->posx; + pp->oposy = pp->posy; + } pp->posx += pp->xvect >> 14; pp->posy += pp->yvect >> 14; COVERupdatesector(pp->posx, pp->posy, §num); @@ -2726,6 +2738,12 @@ DoPlayerMove(PLAYERp pp) } } + if (interpolate_ride) + { + pp->oposx = pp->posx; + pp->oposy = pp->posy; + } + save_cstat = pp->SpriteP->cstat; RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK); COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum); @@ -2748,6 +2766,12 @@ DoPlayerMove(PLAYERp pp) } } + if (interpolate_ride) + { + pp->oposz = pp->posz; + pp->oq16ang = pp->q16ang; + } + // check for warp - probably can remove from CeilingHit if (WarpPlane(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum)) PlayerWarpUpdatePos(pp); diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index 1672ccff9..f20e2c06f 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -1636,11 +1636,6 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny) if (TEST(sop->flags, SOBJ_DONT_ROTATE)) { - if (!cl_sointerpolation || CommEnabled) - { - pp->oposx = pp->posx; - pp->oposy = pp->posy; - } UpdatePlayerSprite(pp); return; } @@ -1686,12 +1681,6 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny) pp->camq16ang = NORM_Q16ANGLE(pp->camq16ang); pp->q16ang = NORM_Q16ANGLE(pp->RevolveQ16Ang + fix16_from_int(pp->RevolveDeltaAng)); - if (!cl_sointerpolation || CommEnabled) - { - pp->oq16ang = pp->q16ang; - pp->oposx = pp->posx; - pp->oposy = pp->posy; - } UpdatePlayerSprite(pp); } @@ -1946,8 +1935,6 @@ PlayerPart: pp->SpriteP->z = pp->loz; } } - if (!cl_sointerpolation || CommEnabled) - pp->oposz = pp->posz; } else {