mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Rob requested a reversion of the NiGHTS camera changes on exiting the level, so here we go.
This commit is contained in:
parent
de77dc4413
commit
9e38f44f34
1 changed files with 8 additions and 18 deletions
10
src/p_user.c
10
src/p_user.c
|
@ -8154,15 +8154,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
|
||||
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)
|
||||
z = mo->z + mo->height - pviewheight - camheight;
|
||||
else
|
||||
z = mo->z + pviewheight + camheight;
|
||||
}
|
||||
else
|
||||
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));
|
||||
|
@ -8419,17 +8414,12 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
f2 = viewpointy-thiscam->y;
|
||||
dist = FixedHypot(f1, f2);
|
||||
|
||||
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 = 0;
|
||||
|
||||
if (twodlevel || (mo->flags2 & MF2_TWOD) || !camstill) // Keep the view still...
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue