From 0cb2f11b13cbf640ee0c0de06992e773240f81f2 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Tue, 22 Nov 2022 22:46:45 -0500 Subject: [PATCH] Set eventmode when testing Special Stages from ZB --- src/d_main.c | 12 ++++++++++++ src/p_mobj.c | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 78741c437..c760d2ad0 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -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); } } diff --git a/src/p_mobj.c b/src/p_mobj.c index d2ec29404..147734252 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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;