Fix FreeBSD build error

This commit is contained in:
spherallic 2024-03-21 19:30:45 +01:00
parent 620f1e55aa
commit dfecbe87b8

View file

@ -1365,8 +1365,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
break;
case MT_NIGHTSEXTRATIME:
boolean eligible = player->powers[pw_carry] == CR_NIGHTSMODE || (G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS));
if ((player->bot && player->bot != BOT_MPAI) || !eligible)
if ((player->bot && player->bot != BOT_MPAI) || !(player->powers[pw_carry] == CR_NIGHTSMODE || (G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS))))
return;
if (!G_IsSpecialStage(gamemap))
{
@ -1378,7 +1377,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
else
{
for (i = 0; i < MAXPLAYERS; i++)
if (playeringame[i] && eligible)
if (playeringame[i] && (player->powers[pw_carry] == CR_NIGHTSMODE || (G_IsSpecialStage(gamemap) && !(maptol & TOL_NIGHTS))))
{
players[i].nightstime += special->info->speed;
players[i].startedtime += special->info->speed;