mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
* 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:
parent
9c02c81095
commit
8b519631f8
2 changed files with 20 additions and 10 deletions
|
@ -451,7 +451,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
spr2 = SPR2_GASP;
|
||||
break;
|
||||
case SPR2_SJMP:
|
||||
spr2 = SPR2_JUMP;
|
||||
spr2 = (player->charflags & SF_NOJUMPSPIN) ? SPR2_SSPG : SPR2_SSPN;
|
||||
break;
|
||||
case SPR2_SSPG:
|
||||
spr2 = SPR2_SPNG;
|
||||
|
|
28
src/p_user.c
28
src/p_user.c
|
@ -5781,7 +5781,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
if (player->exiting > 0) //&& player->exiting < 2*TICRATE)
|
||||
if (player->exiting > 0) // && player->exiting < 2*TICRATE)
|
||||
{
|
||||
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);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // I never liked how the camera moved with the player.
|
||||
{
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
}
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
z = thiscam->z;
|
||||
|
||||
// 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));
|
||||
|
@ -8418,12 +8423,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
f2 = viewpointy-thiscam->y;
|
||||
dist = FixedHypot(f1, f2);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
|
||||
if (!(player->pflags & PF_NIGHTSMODE && player->exiting)) // Ditto.
|
||||
{
|
||||
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
|
||||
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
|
||||
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;'
|
||||
angle = 0;
|
||||
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still...
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue