mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Added shavit_replay_botplususe (#660)
This commit is contained in:
parent
5a933fd135
commit
be0b9e6c44
@ -109,6 +109,7 @@ ConVar gCV_TimeLimit = null;
|
||||
ConVar gCV_DefaultTeam = null;
|
||||
ConVar gCV_CentralBot = null;
|
||||
ConVar gCV_BotShooting = null;
|
||||
ConVar gCV_BotPlusUse = null;
|
||||
|
||||
// cached cvars
|
||||
bool gB_Enabled = true;
|
||||
@ -117,6 +118,7 @@ float gF_TimeLimit = 5400.0;
|
||||
int gI_DefaultTeam = 3;
|
||||
bool gB_CentralBot = true;
|
||||
int gI_BotShooting = 3;
|
||||
bool gB_BotPlusUse = true;
|
||||
|
||||
// timer settings
|
||||
int gI_Styles = 0;
|
||||
@ -211,6 +213,7 @@ public void OnPluginStart()
|
||||
gCV_DefaultTeam = CreateConVar("shavit_replay_defaultteam", "3", "Default team to make the bots join, if possible.\n2 - Terrorists/RED\n3 - Counter Terrorists/BLU", 0, true, 2.0, true, 3.0);
|
||||
gCV_CentralBot = CreateConVar("shavit_replay_centralbot", "1", "Have one central bot instead of one bot per replay.\nTriggered with !replay.\nRestart the map for changes to take effect.\nThe disabled setting is not supported - use at your own risk.\n0 - Disabled\n1 - Enabled", 0, true, 0.0, true, 1.0);
|
||||
gCV_BotShooting = CreateConVar("shavit_replay_botshooting", "3", "Attacking buttons to allow for bots.\n0 - none\1 - +attack\n2 - +attack2\n3 - both", 0, true, 0.0, true, 3.0);
|
||||
gCV_BotPlusUse = CreateConVar("shavit_replay_botplususe", "1", "Allow bots to use +use?", 0, true, 0.0, true, 1.0);
|
||||
|
||||
gCV_Enabled.AddChangeHook(OnConVarChanged);
|
||||
gCV_ReplayDelay.AddChangeHook(OnConVarChanged);
|
||||
@ -218,6 +221,7 @@ public void OnPluginStart()
|
||||
gCV_DefaultTeam.AddChangeHook(OnConVarChanged);
|
||||
gCV_CentralBot.AddChangeHook(OnConVarChanged);
|
||||
gCV_BotShooting.AddChangeHook(OnConVarChanged);
|
||||
gCV_BotPlusUse.AddChangeHook(OnConVarChanged);
|
||||
|
||||
AutoExecConfig();
|
||||
|
||||
@ -253,6 +257,7 @@ public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] n
|
||||
gI_DefaultTeam = gCV_DefaultTeam.IntValue;
|
||||
gB_CentralBot = gCV_CentralBot.BoolValue;
|
||||
gI_BotShooting = gCV_BotShooting.IntValue;
|
||||
gB_BotPlusUse = gCV_BotPlusUse.BoolValue;
|
||||
|
||||
if(convar == gCV_CentralBot)
|
||||
{
|
||||
@ -1544,6 +1549,11 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
buttons &= ~IN_ATTACK2;
|
||||
}
|
||||
|
||||
if(gB_BotPlusUse)
|
||||
{
|
||||
buttons &= ~IN_USE;
|
||||
}
|
||||
|
||||
MoveType mt = MOVETYPE_NOCLIP;
|
||||
|
||||
if(gA_FrameCache[style][track][3] >= 0x02)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user