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