From: mand1nga Date: Tue, 9 Aug 2011 03:45:46 +0000 (-0300) Subject: Ignore destructed devices (doesn't fully work yet) X-Git-Tag: xonotic-v0.5.0~122^2^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=42d0d3b0c1710e6eb7689a8a26785243832d0903;p=xonotic%2Fxonotic-data.pk3dir.git Ignore destructed devices (doesn't fully work yet) --- diff --git a/qcsrc/server/bot/havocbot/role_assault.qc b/qcsrc/server/bot/havocbot/role_assault.qc index e5e3bdb6c..57380dd03 100644 --- a/qcsrc/server/bot/havocbot/role_assault.qc +++ b/qcsrc/server/bot/havocbot/role_assault.qc @@ -36,8 +36,9 @@ void havocbot_goalrating_ast_targets(float ratingscale) { if(tod.classname == "target_objective_decrease") { - if(tod.enemy.health < ASSAULT_VALUE_INACTIVE) + if(tod.enemy.health > 0 && tod.enemy.health < ASSAULT_VALUE_INACTIVE) { + dprint(etos(tod.enemy),"\n"); found = TRUE; break; } @@ -87,7 +88,10 @@ void havocbot_goalrating_ast_targets(float ratingscale) if(checkpvs(self.view_ofs,ad)) if(checkpvs(self.view_ofs,best)) + { + // dprint("increasing attack time for this target\n"); self.havocbot_attack_time = time + 2; + } } } }