From 38a515f8e5ce21865537b5333785cc6247953162 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 26 Dec 2022 23:11:23 +0000 Subject: [PATCH] Also make Grand Prix bots spectators if the gametype doesn't support them (or if the initialisation happens into a GPEVENT) --- src/d_clisrv.c | 3 +++ src/k_grandprix.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index ac602a28f..0be6c8d96 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3748,6 +3748,9 @@ static void Got_AddBot(UINT8 **p, INT32 playernum) sprintf(player_names[newplayernum], "%s", skins[skinnum].realname); SetPlayerSkinByNum(newplayernum, skinnum); + players[newplayernum].spectator = !(gametyperules & GTR_BOTS) + || (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE); + if (netgame) { HU_AddChatText(va("\x82*Bot %d has been added to the game", newplayernum+1), false); diff --git a/src/k_grandprix.c b/src/k_grandprix.c index 4ca90fe04..d26787100 100644 --- a/src/k_grandprix.c +++ b/src/k_grandprix.c @@ -338,7 +338,7 @@ void K_UpdateGrandPrixBots(void) continue; } - players[i].spectator = (grandprixinfo.eventmode != GPEVENT_NONE); + players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE); } // Find the rival.