From c653ad00503a56869d0b34371ad5f51c2784f8ac Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 8 Jun 2018 01:12:07 -0400 Subject: [PATCH] A better method of Instead of returning at the very start of P_MoveChaseCamera, just set camstill to true, and add another exiting check to momentum. This lets the mirror mode post process effect to continue working. --- src/p_inter.c | 3 +++ src/p_user.c | 49 ++++++++++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 16757431e..ad465d5f1 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -152,6 +152,9 @@ void P_ResetStarposts(void) // boolean P_CanPickupItem(player_t *player, boolean weapon) { + if (player->exiting) + return false; + /*if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match return false;*/ diff --git a/src/p_user.c b/src/p_user.c index d59908a43..5b730c748 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8138,9 +8138,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall subsector_t *newsubsec; fixed_t f1, f2; - if (player->exiting) // SRB2Kart: Leave the camera behind while exiting, for dramatic effect! - return true; - cameranoclip = (player->pflags & (PF_NOCLIP|PF_NIGHTSMODE)) || (player->mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)); // Noclipping player camera noclips too!! if (!(player->climbing || (player->pflags & PF_NIGHTSMODE) || player->playerstate == PST_DEAD)) @@ -8275,8 +8272,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall lookback = camspin4; } - // SRB2kart - Camera flipper - if (lookback) + if (player->exiting) // SRB2Kart: Leave the camera behind while exiting, for dramatic effect! + camstill = true; + else if (lookback) // SRB2kart - Camera flipper { camrotate += 180; camspeed *= 2; @@ -8684,27 +8682,36 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall } }*/ - if (twodlevel || (mo->flags2 & MF2_TWOD)) + if (player->exiting) { - thiscam->momx = x-thiscam->x; - thiscam->momy = y-thiscam->y; - thiscam->momz = z-thiscam->z; + thiscam->momx = 0; + thiscam->momy = 0; + thiscam->momz = 0; } else { - thiscam->momx = FixedMul(x - thiscam->x, camspeed); - thiscam->momy = FixedMul(y - thiscam->y, camspeed); - - if ((GETSECSPECIAL(thiscam->subsector->sector->special, 1) == 6 - && thiscam->z < thiscam->subsector->sector->floorheight + 256*FRACUNIT - && FixedMul(z - thiscam->z, camspeed) < 0) -#if 0 - || player->kartstuff[k_pogospring] // SRB2Kart: don't follow while bouncing, experimental -#endif - ) - thiscam->momz = 0; // Don't go down a death pit + if (twodlevel || (mo->flags2 & MF2_TWOD)) + { + thiscam->momx = x-thiscam->x; + thiscam->momy = y-thiscam->y; + thiscam->momz = z-thiscam->z; + } else - thiscam->momz = FixedMul(z - thiscam->z, camspeed); + { + thiscam->momx = FixedMul(x - thiscam->x, camspeed); + thiscam->momy = FixedMul(y - thiscam->y, camspeed); + + if ((GETSECSPECIAL(thiscam->subsector->sector->special, 1) == 6 + && thiscam->z < thiscam->subsector->sector->floorheight + 256*FRACUNIT + && FixedMul(z - thiscam->z, camspeed) < 0) +#if 0 + || player->kartstuff[k_pogospring] // SRB2Kart: don't follow while bouncing, experimental +#endif + ) + thiscam->momz = 0; // Don't go down a death pit + else + thiscam->momz = FixedMul(z - thiscam->z, camspeed); + } } // compute aming to look the viewed point