Merge branch 'mpss-extratime' into 'next'

Make Extra Time powerup work in old-style special stages

See merge request STJr/SRB2!2292
This commit is contained in:
sphere 2024-03-21 15:49:12 +00:00
commit 620f1e55aa

View file

@ -1365,7 +1365,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))
{
@ -1377,7 +1378,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;