From e3d682875c13c56b2bcae1da8815e6f02fe60e0c Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Sat, 12 Feb 2011 01:53:19 +0200 Subject: [PATCH] Only for bots skill 5 and up. Since only such both can reload weapons in their inventory idly, so not switching to unloaded weapons for lower skills would cause them to never reload their guns. This also makes bots more stupid at lower skills, causing them to switch to guns they'll then have to reload during fighting. --- qcsrc/server/bot/havocbot/havocbot.qc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 3490f1488..7c7392085 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -942,6 +942,12 @@ void havocbot_chooseenemy() float havocbot_chooseweapon_checkreload(float new_weapon) { + // bots under this skill cannot find unloaded weapons to reload idly when not in combat, + // so skip this for them, or they'll never get to reload their weapons at all. + // this also allows bots under this skill to be more stupid, and reload more often during combat :) + if(skill < 5) + return FALSE; + // if this weapon is scheduled for reloading, don't switch to it during combat if (self.weapon_load[new_weapon] < 0) { @@ -955,6 +961,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon) if(other_weapon_available) return TRUE; } + return FALSE; } -- 2.39.2