]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix the bounds check issue for real.
authorRudolf Polzer <divVerent@gmail.com>
Wed, 30 Oct 2024 16:57:24 +0000 (12:57 -0400)
committerRudolf Polzer <divVerent@gmail.com>
Wed, 30 Oct 2024 16:57:24 +0000 (12:57 -0400)
No idea _why_ we get here with a null weaponentity though.

qcsrc/server/bot/default/havocbot/havocbot.qc

index 33beb5d3e1fac102d4040b7ba956f048f7ae4525..aa2c1aab557f36dcdf0e7c0119b8cf89152d6ffc 100644 (file)
@@ -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