Since I was tired of seeing NiGHTS players bump their head into the ceiling, and since similar camera enhancements have been made for the papersprite sign exit, implement a camera lock when exiting while NiGHTS.

https://cdn.discordapp.com/attachments/359091121789468672/647821662003396609/srb20088.gif
This commit is contained in:
toaster 2019-11-23 15:40:32 +00:00
parent 4ccb4f5c8a
commit 90c13effc0
1 changed files with 9 additions and 2 deletions

View File

@ -9632,8 +9632,15 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
mo = player->mo;
if (player->exiting && mo->target && mo->target->type == MT_SIGN)
sign = mo->target;
if (player->exiting)
{
if (mo->target && mo->target->type == MT_SIGN && mo->target->spawnpoint)
sign = mo->target;
else if ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& !(player->mo->state >= &states[S_PLAY_NIGHTS_TRANS1]
&& player->mo->state <= &states[S_PLAY_NIGHTS_TRANS6]))
return true;
}
cameranoclip = (player->powers[pw_carry] == CR_NIGHTSMODE || player->pflags & PF_NOCLIP) || (mo->flags & (MF_NOCLIP|MF_NOCLIPHEIGHT)); // Noclipping player camera noclips too!!