From: Rudolf Polzer Date: Wed, 30 Oct 2024 16:57:24 +0000 (-0400) Subject: Fix the bounds check issue for real. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55bb84d5a23db56464fa3e92e97488ad6d407561;p=xonotic%2Fxonotic-data.pk3dir.git Fix the bounds check issue for real. No idea _why_ we get here with a null weaponentity though. --- 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