From: terencehill Date: Sat, 9 Sep 2017 13:47:02 +0000 (+0200) Subject: Bot AI: take into account invincibility powerup when rating enemies X-Git-Tag: xonotic-v0.8.5~2378^2~64 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=0c54ce23ae6e0366ac221f95e703f22a3abe2e85;hp=be76b4e1310bc374be982d4e7b02b0b8a682a592;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: take into account invincibility powerup when rating enemies --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index f20855d95..44eaeea0d 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -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;