Make Extra Time powerup work in old-style special stages

This commit is contained in:
spherallic 2024-02-05 01:28:35 +01:00
parent c91fc082f9
commit af4e64d1a5

View file

@ -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;