Rob requested a reversion of the NiGHTS camera changes on exiting the level, so here we go.

This commit is contained in:
toasterbabe 2016-08-12 21:24:17 +01:00
parent de77dc4413
commit 9e38f44f34

View file

@ -8154,15 +8154,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
pviewheight = FixedMul(cv_viewheight.value<<FRACBITS, mo->scale); pviewheight = FixedMul(cv_viewheight.value<<FRACBITS, mo->scale);
if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // I never liked how the camera moved with the player.
{
if (mo->eflags & MFE_VERTICALFLIP) if (mo->eflags & MFE_VERTICALFLIP)
z = mo->z + mo->height - pviewheight - camheight; z = mo->z + mo->height - pviewheight - camheight;
else else
z = mo->z + pviewheight + camheight; z = mo->z + pviewheight + camheight;
}
else
z = thiscam->z;
// move camera down to move under lower ceilings // move camera down to move under lower ceilings
newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1)); newsubsec = R_IsPointInSubsector(((mo->x>>FRACBITS) + (thiscam->x>>FRACBITS))<<(FRACBITS-1), ((mo->y>>FRACBITS) + (thiscam->y>>FRACBITS))<<(FRACBITS-1));
@ -8419,17 +8414,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
f2 = viewpointy-thiscam->y; f2 = viewpointy-thiscam->y;
dist = FixedHypot(f1, f2); dist = FixedHypot(f1, f2);
if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // Ditto.
{
if (mo->eflags & MFE_VERTICALFLIP) if (mo->eflags & MFE_VERTICALFLIP)
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player)); angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
else else
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player)); angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
if (player->playerstate != PST_DEAD) if (player->playerstate != PST_DEAD)
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;' angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
}
else
angle = 0;
if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still... if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still...
{ {