]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to allow bots to typefrag
authorMario <mario@smbclan.net>
Sat, 17 Mar 2018 12:30:06 +0000 (22:30 +1000)
committerMario <mario@smbclan.net>
Sat, 17 Mar 2018 12:30:06 +0000 (22:30 +1000)
qcsrc/server/bot/default/aim.qc
qcsrc/server/bot/default/cvars.qh
xonotic-server.cfg

index 5ad1295f990f0b3d16be6b989e3263e4b17b3466..fde4c0154a6199ebf4174ca23611c21cb7a2e650 100644 (file)
@@ -139,7 +139,7 @@ bool bot_shouldattack(entity this, entity targ)
                return false;
        if (IS_DEAD(targ))
                return false;
-       if (PHYS_INPUT_BUTTON_CHAT(targ))
+       if (PHYS_INPUT_BUTTON_CHAT(targ) && !autocvar_bot_typefrag)
                return false;
        if(targ.flags & FL_NOTARGET)
                return false;
index 16b2aaf4312367da99abc30e2d9427f23c1d2402..aea112d9edf75d126ded64b3907ad1c6dcfa1097 100644 (file)
@@ -54,6 +54,7 @@ bool autocvar_bot_usemodelnames;
 bool autocvar_bot_debug_tracewalk;
 bool autocvar_bot_debug_goalstack;
 bool autocvar_bot_wander_enable;
+bool autocvar_bot_typefrag;
 bool autocvar_g_debug_bot_commands;
 int autocvar_g_waypointeditor_auto;
 float autocvar_skill_auto;
index 8f1457a034a07e6d4caf2edfdea024d68d55079a..29d5c2f6754b51442d06df46def79bf1ad2e04e2 100644 (file)
@@ -116,6 +116,7 @@ set skill_auto 0    "when 1, \"skill\" gets adjusted to match the best player on th
 set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
 set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
 set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
+set bot_typefrag 0 "Allow bots to shoot players while they're typing"
 // general bot AI cvars
 set bot_ai_thinkinterval 0.05
 set bot_ai_strategyinterval 7 "How often a new objective is chosen"