From 90c13effc02ee6be94f04dd8026d99ba7e26872f Mon Sep 17 00:00:00 2001
From: toaster <rollerorbital@gmail.com>
Date: Sat, 23 Nov 2019 15:40:32 +0000
Subject: [PATCH] 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
---
 src/p_user.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/p_user.c b/src/p_user.c
index 0140bee4de..68b99ae3ee 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -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!!
 
-- 
GitLab