From 55bb84d5a23db56464fa3e92e97488ad6d407561 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 30 Oct 2024 12:57:24 -0400 Subject: [PATCH] Fix the bounds check issue for real. No idea _why_ we get here with a null weaponentity though. --- 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 33beb5d3e..aa2c1aab5 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 = this.(weaponentity) == WEP_Null ? 0.0 : ATTACK_FINISHED(this, weaponentity); + af = ((this.weaponentity.m_weapon == 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