From a52d75c7f8c61bc838f90fa0fbe69371ea1739f1 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 30 Oct 2024 12:50:40 -0400 Subject: [PATCH] Fix another invalid array access. --- qcsrc/server/bot/default/havocbot/havocbot.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 2aa283520..33beb5d3e 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -1544,7 +1544,7 @@ void havocbot_chooseweapon(entity this, .entity weaponentity) // Should it do a weapon combo? float af, ct, combo_time, combo; - af = ATTACK_FINISHED(this, weaponentity); + af = this.(weaponentity) == WEP_Null ? 0.0 : ATTACK_FINISHED(this, weaponentity); ct = autocvar_bot_ai_weapon_combo_threshold; // Bots with no skill will be 4 times more slower than "godlike" bots when doing weapon combos -- 2.39.2