diff --git a/src/k_grandprix.c b/src/k_grandprix.c index 65a8e3acd..f65e7aec3 100644 --- a/src/k_grandprix.c +++ b/src/k_grandprix.c @@ -307,8 +307,6 @@ void K_LoadGrandPrixSaveGame(void) players[i].botvars.rival = savedata.bots[i].rival; players[i].score = savedata.bots[i].score; - - players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE); } } @@ -381,16 +379,6 @@ void K_UpdateGrandPrixBots(void) return; } - for (i = 0; i < MAXPLAYERS; i++) - { - if (!playeringame[i] || !players[i].bot) - { - continue; - } - - players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE); - } - // Find the rival. for (i = 0; i < MAXPLAYERS; i++) { diff --git a/src/p_mobj.c b/src/p_mobj.c index e1090bf33..81ebeb814 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11784,6 +11784,24 @@ void P_SpawnPlayer(INT32 playernum) if (justjoined) G_SpectatePlayerOnJoin(playernum); + if (p->bot && !demo.playback) // Don't mess with spectator values since the demo setup handles them already. + { + if (K_PodiumSequence() == true) + ; // This is too late to correct spectator status. Whatever state we're in at this point, our (dog) bed is made. + else if (!(gametyperules & GTR_BOTS) + || (grandprixinfo.gp == true + && grandprixinfo.eventmode != GPEVENT_NONE)) + { + // Bots aren't supposed to be here. + p->spectator = true; + } + else + { + // No point in a spectating bot! + p->spectator = false; + } + } + if (G_GametypeHasTeams()) { // If you're in a team game and you don't have a team assigned yet...