]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix another invalid array access.
authorRudolf Polzer <divVerent@gmail.com>
Wed, 30 Oct 2024 16:50:40 +0000 (12:50 -0400)
committerRudolf Polzer <divVerent@gmail.com>
Wed, 30 Oct 2024 16:50:40 +0000 (12:50 -0400)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 2aa283520111482a5c2bd4d36fe51bab1c4942fd..33beb5d3e1fac102d4040b7ba956f048f7ae4525 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 = 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