]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: take into account invincibility powerup when rating enemies
authorterencehill <piuntn@gmail.com>
Sat, 9 Sep 2017 13:47:02 +0000 (15:47 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 9 Sep 2017 13:47:02 +0000 (15:47 +0200)
qcsrc/server/bot/default/havocbot/roles.qc

index f20855d95e1bbf9f8f1979b040ea7cfa63583c6e..44eaeea0d5bd9b0560281fb25746baa5e5932ea3 100644 (file)
@@ -187,6 +187,8 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org
                {
                        if (time < this.strength_finished - 1) t += 0.5;
                        if (time < it.strength_finished - 1) t -= 0.5;
+                       if (time < this.invincible_finished - 1) t += 0.2;
+                       if (time < it.invincible_finished - 1) t -= 0.4;
                }
                t += max(0, 8 - skill) * 0.05; // less skilled bots attack more mindlessly
                ratingscale *= t;