* Keep the camera still when ending a NiGHTS map. http://gfycat.com/ComplicatedComposedAoudad

* Correcting an earlier oversight with the SPR2_ defaulting system for super forms.
This commit is contained in:
toasterbabe 2016-08-12 15:40:17 +01:00
parent 9c02c81095
commit 8b519631f8
2 changed files with 20 additions and 10 deletions

View file

@ -451,7 +451,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
spr2 = SPR2_GASP; spr2 = SPR2_GASP;
break; break;
case SPR2_SJMP: case SPR2_SJMP:
spr2 = SPR2_JUMP; spr2 = (player->charflags & SF_NOJUMPSPIN) ? SPR2_SSPG : SPR2_SSPN;
break; break;
case SPR2_SSPG: case SPR2_SSPG:
spr2 = SPR2_SPNG; spr2 = SPR2_SPNG;

View file

@ -5781,7 +5781,7 @@ static void P_NiGHTSMovement(player_t *player)
return; return;
} }
if (player->exiting > 0) //&& player->exiting < 2*TICRATE) if (player->exiting > 0) // && player->exiting < 2*TICRATE)
{ {
player->mo->momx = player->mo->momy = 0; player->mo->momx = player->mo->momy = 0;
@ -8158,10 +8158,15 @@ 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 (mo->eflags & MFE_VERTICALFLIP) if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // I never liked how the camera moved with the player.
z = mo->z + mo->height - pviewheight - camheight; {
if (mo->eflags & MFE_VERTICALFLIP)
z = mo->z + mo->height - pviewheight - camheight;
else
z = mo->z + pviewheight + camheight;
}
else else
z = mo->z + pviewheight + camheight; 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));
@ -8418,12 +8423,17 @@ 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 (mo->eflags & MFE_VERTICALFLIP) if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // Ditto.
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player)); {
if (mo->eflags & MFE_VERTICALFLIP)
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
else
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
if (player->playerstate != PST_DEAD)
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
}
else else
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player)); angle = 0;
if (player->playerstate != PST_DEAD && !(player->pflags & PF_NIGHTSMODE && player->exiting))
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still... if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still...
{ {