From af4e64d1a5f370a9495a5b2259c192bc51458ad6 Mon Sep 17 00:00:00 2001
From: spherallic <spherallic@gmail.com>
Date: Mon, 5 Feb 2024 01:28:35 +0100
Subject: [PATCH] Make Extra Time powerup work in old-style special stages

---
 src/p_inter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/p_inter.c b/src/p_inter.c
index d8765e7a2b..c51e43801f 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1332,7 +1332,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 			}
 			break;
 		case MT_NIGHTSEXTRATIME:
-			if ((player->bot && player->bot != BOT_MPAI) || !(player->powers[pw_carry] == CR_NIGHTSMODE))
+			boolean eligible = player->powers[pw_carry] == CR_NIGHTSMODE || (G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS));
+			if ((player->bot && player->bot != BOT_MPAI) || !eligible)
 				return;
 			if (!G_IsSpecialStage(gamemap))
 			{
@@ -1344,7 +1345,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 			else
 			{
 				for (i = 0; i < MAXPLAYERS; i++)
-					if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
+					if (playeringame[i] && eligible)
 					{
 						players[i].nightstime += special->info->speed;
 						players[i].startedtime += special->info->speed;
-- 
GitLab