mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix the spectating bots in GP issue a different way
The solution in 67c2ae021b happens too late for K_TimeAttackRules
This commit is contained in:
parent
43eb61dfcb
commit
1dd2e7031a
3 changed files with 18 additions and 19 deletions
|
|
@ -307,6 +307,8 @@ void K_LoadGrandPrixSaveGame(void)
|
||||||
|
|
||||||
players[i].botvars.rival = savedata.bots[i].rival;
|
players[i].botvars.rival = savedata.bots[i].rival;
|
||||||
players[i].score = savedata.bots[i].score;
|
players[i].score = savedata.bots[i].score;
|
||||||
|
|
||||||
|
players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -379,6 +381,21 @@ void K_UpdateGrandPrixBots(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i] || !players[i].bot)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (grandprixinfo.wonround == false)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Find the rival.
|
// Find the rival.
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
18
src/p_mobj.c
18
src/p_mobj.c
|
|
@ -11801,24 +11801,6 @@ void P_SpawnPlayer(INT32 playernum)
|
||||||
if (justjoined)
|
if (justjoined)
|
||||||
G_SpectatePlayerOnJoin(playernum);
|
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 (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
// If you're in a team game and you don't have a team assigned yet...
|
// If you're in a team game and you don't have a team assigned yet...
|
||||||
|
|
|
||||||
|
|
@ -8559,7 +8559,7 @@ void P_PostLoadLevel(void)
|
||||||
K_InitGrandPrixBots();
|
K_InitGrandPrixBots();
|
||||||
grandprixinfo.initalize = false;
|
grandprixinfo.initalize = false;
|
||||||
}
|
}
|
||||||
else if (grandprixinfo.wonround == true)
|
else
|
||||||
{
|
{
|
||||||
K_UpdateGrandPrixBots();
|
K_UpdateGrandPrixBots();
|
||||||
grandprixinfo.wonround = false;
|
grandprixinfo.wonround = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue