Also make Grand Prix bots spectators if the gametype doesn't support them (or if the initialisation happens into a GPEVENT)

This commit is contained in:
toaster 2022-12-26 23:11:23 +00:00
parent a3d0c197ec
commit 38a515f8e5
2 changed files with 4 additions and 1 deletions

View file

@ -3748,6 +3748,9 @@ static void Got_AddBot(UINT8 **p, INT32 playernum)
sprintf(player_names[newplayernum], "%s", skins[skinnum].realname);
SetPlayerSkinByNum(newplayernum, skinnum);
players[newplayernum].spectator = !(gametyperules & GTR_BOTS)
|| (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE);
if (netgame)
{
HU_AddChatText(va("\x82*Bot %d has been added to the game", newplayernum+1), false);

View file

@ -338,7 +338,7 @@ void K_UpdateGrandPrixBots(void)
continue;
}
players[i].spectator = (grandprixinfo.eventmode != GPEVENT_NONE);
players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE);
}
// Find the rival.