Set eventmode when testing Special Stages from ZB

This commit is contained in:
Sally Coolatta 2022-11-22 22:46:45 -05:00
parent 2a0926bff4
commit 0cb2f11b13
2 changed files with 16 additions and 4 deletions

View file

@ -1849,6 +1849,18 @@ void D_SRB2Main(void)
G_SetUsedCheats();
}
if (grandprixinfo.gp == true && mapheaderinfo[pstartmap-1])
{
if (mapheaderinfo[pstartmap-1]->typeoflevel & TOL_SPECIAL)
{
specialStage.active = true;
specialStage.encore = grandprixinfo.encore;
grandprixinfo.eventmode = GPEVENT_SPECIAL;
}
G_SetUsedCheats();
}
D_MapChange(pstartmap, gametype, (cv_kartencore.value == 1), true, 0, false, false);
}
}

View file

@ -46,6 +46,7 @@
#include "k_terrain.h"
#include "k_collide.h"
#include "k_objects.h"
#include "k_grandprix.h"
static CV_PossibleValue_t CV_BobSpeed[] = {{0, "MIN"}, {4*FRACUNIT, "MAX"}, {0, NULL}};
consvar_t cv_movebob = CVAR_INIT ("movebob", "1.0", CV_FLOAT|CV_SAVE, CV_BobSpeed, NULL);
@ -11305,13 +11306,12 @@ void P_SpawnPlayer(INT32 playernum)
}
else if (p->bot)
{
/*
if (bonusgame || specialstage || boss)
if (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE)
{
// Bots should avoid
// Bots aren't supposed to be here.
p->spectator = true;
}
*/
else
{
// No point in a spectating bot!
p->spectator = false;