mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-16 02:26:24 +00:00
Add forcebots cheat, spawn bots in non-GTR_BOTS gametypes
This commit is contained in:
parent
1cf7115a97
commit
331be71735
3 changed files with 12 additions and 2 deletions
|
|
@ -802,6 +802,7 @@ consvar_t cv_capsuletest = OnlineCheat("capsuletest", "Off").values(capsuletest_
|
|||
|
||||
consvar_t cv_debugcheese = OnlineCheat("debugcheese", "Off").on_off().description("Disable checks that prevent farming item boxes");
|
||||
consvar_t cv_debugencorevote = OnlineCheat("debugencorevote", "Off").on_off().description("Force encore choice to appear on vote screen");
|
||||
consvar_t cv_forcebots = OnlineCheat("forcebots", "No").yes_no().description("Force bots to appear, even in wrong game modes");
|
||||
|
||||
void ForceSkin_OnChange(void);
|
||||
consvar_t cv_forceskin = OnlineCheat("forcecharacter", "None").onchange(ForceSkin_OnChange).description("Force all players to use one character");
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@
|
|||
#include "discord.h" // DRPC_UpdatePresence
|
||||
#include "i_net.h" // doomcom
|
||||
|
||||
extern "C" consvar_t cv_forcebots;
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_SetBot(UINT8 playerNum, UINT8 skinnum, UINT8 difficulty, botStyle_e style)
|
||||
|
||||
|
|
@ -189,7 +191,7 @@ void K_UpdateMatchRaceBots(void)
|
|||
}
|
||||
grabskins[usableskins] = MAXSKINS;
|
||||
|
||||
if ((gametyperules & GTR_BOTS) == 0)
|
||||
if ((gametyperules & GTR_BOTS) == 0 && !cv_forcebots.value)
|
||||
{
|
||||
difficulty = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ void K_UpdateGrandPrixBots(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
players[i].spectator = !(gametyperules & GTR_BOTS) || (grandprixinfo.eventmode != GPEVENT_NONE);
|
||||
players[i].spectator = K_BotDefaultSpectator();
|
||||
}
|
||||
|
||||
if (grandprixinfo.wonround == false)
|
||||
|
|
@ -901,6 +901,13 @@ boolean K_CanChangeRules(boolean allowdemos)
|
|||
--------------------------------------------------*/
|
||||
boolean K_BotDefaultSpectator(void)
|
||||
{
|
||||
extern consvar_t cv_forcebots;
|
||||
|
||||
if (cv_forcebots.value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(gametyperules & GTR_BOTS))
|
||||
{
|
||||
// This gametype does not support bots.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue