Fix bots not being able to spawn for podium

(This might break titlemaps but maybe titlemaps should do something more explicit to hide all players)
This commit is contained in:
Sally Coolatta 2023-03-02 16:16:36 -05:00
parent dddc992e24
commit 2806f1c085
2 changed files with 11 additions and 2 deletions

View file

@ -2109,7 +2109,7 @@ void G_Ticker(boolean run)
marathontime++; marathontime++;
P_MapStart(); P_MapStart();
// do player reborns if needed
if (gamestate == GS_LEVEL) if (gamestate == GS_LEVEL)
{ {
// Or, alternatively, retry. // Or, alternatively, retry.
@ -2127,11 +2127,18 @@ void G_Ticker(boolean run)
D_MapChange(gamemap, gametype, (cv_kartencore.value == 1), false, 1, false, false); D_MapChange(gamemap, gametype, (cv_kartencore.value == 1), false, 1, false, false);
} }
}
// do player reborns if needed
if (G_GamestateUsesLevel() == true)
{
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && players[i].playerstate == PST_REBORN) if (playeringame[i] && players[i].playerstate == PST_REBORN)
G_DoReborn(i); G_DoReborn(i);
}
} }
P_MapEnd(); P_MapEnd();
// do things to change the game state // do things to change the game state

View file

@ -11740,7 +11740,9 @@ void P_SpawnPlayer(INT32 playernum)
} }
else if (p->bot) else if (p->bot)
{ {
if (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE) if (K_PodiumSequence() == false
&& grandprixinfo.gp == true
&& grandprixinfo.eventmode != GPEVENT_NONE)
{ {
// Bots aren't supposed to be here. // Bots aren't supposed to be here.
p->spectator = true; p->spectator = true;