]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: also leave powerup to teammates closer to it
authorterencehill <piuntn@gmail.com>
Wed, 11 Oct 2017 18:02:25 +0000 (20:02 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 11 Oct 2017 18:02:25 +0000 (20:02 +0200)
qcsrc/server/bot/default/havocbot/roles.qc

index de1bb92496a3e6f991d0c3890448d58bf6d469d2..6de84898fcbd1d374437274c043c5f95b3fa5fdd 100644 (file)
@@ -54,6 +54,7 @@ bool havocbot_goalrating_item_can_be_left_to_teammate(entity this, entity player
        if (item.ammo_rockets && player.ammo_rockets <= this.ammo_rockets) {return true;}
        if (item.ammo_cells && player.ammo_cells <= this.ammo_cells) {return true;}
        if (item.ammo_plasma && player.ammo_plasma <= this.ammo_plasma) {return true;}
+       if (item.itemdef.instanceOfPowerup) {return true;}
 
        return false;
 };