From 5e6795dabb4058243920e10607f1b49fd81425b1 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 11 Feb 2011 23:35:43 +0200 Subject: [PATCH] Ok, let's do a few changes to the bot AI too. Bots should not switch weapons while reloading. Since not being very intelligent, they will end up with lots of unloaded weapons they'll keep switching between, not getting to shoot many of them at all. --- qcsrc/server/bot/havocbot/havocbot.qc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index fc56cee64..0c5b82b7a 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -941,6 +941,11 @@ void havocbot_chooseweapon() return; } + // Do not change weapon while reloading. If we do, the bot risks switching betwen empty weapons + // before getting to reload them, shooting none of them at all, giving lower overall performance + if(self.weapon && self.clip_load < 1) + return; + // Do not change weapon during the next second after a combo i = time - self.lastcombotime; if(i < 1) -- 2.39.2