mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-04 15:12:58 +00:00
Add DEVELOP cvar "botcontrol" to disable bot actions
This commit is contained in:
parent
ff23501e74
commit
bf901f0166
3 changed files with 17 additions and 0 deletions
|
|
@ -66,6 +66,7 @@
|
|||
#include "g_party.h"
|
||||
#include "k_vote.h"
|
||||
#include "k_zvote.h"
|
||||
#include "k_bot.h"
|
||||
|
||||
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
||||
#include "m_avrecorder.h"
|
||||
|
|
@ -982,6 +983,7 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_noresults);
|
||||
CV_RegisterVar(&cv_badtime);
|
||||
CV_RegisterVar(&cv_badip);
|
||||
CV_RegisterVar(&cv_botcontrol);
|
||||
#endif
|
||||
|
||||
// HUD
|
||||
|
|
|
|||
11
src/k_bot.c
11
src/k_bot.c
|
|
@ -32,6 +32,10 @@
|
|||
#include "k_respawn.h"
|
||||
#include "m_easing.h"
|
||||
|
||||
#ifdef DEVELOP
|
||||
consvar_t cv_botcontrol = CVAR_INIT ("botcontrol", "On", 0, CV_OnOff, NULL);
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------
|
||||
boolean K_AddBot(UINT8 skin, UINT8 difficulty, UINT8 *p)
|
||||
|
||||
|
|
@ -1516,6 +1520,13 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
// Defanging bots for testing.
|
||||
#ifdef DEVELOP
|
||||
if (!cv_botcontrol.value)
|
||||
return;
|
||||
#endif
|
||||
// Actual gameplay behaviors below this block!
|
||||
|
||||
if (K_TryRingShooter(player) == true)
|
||||
{
|
||||
// We want to respawn. Simply hold Y and stop here!
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef DEVELOP
|
||||
extern consvar_t cv_botcontrol;
|
||||
#endif
|
||||
|
||||
// Maximum value of botvars.difficulty
|
||||
#define MAXBOTDIFFICULTY 13
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue