]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Ignore destructed devices (doesn't fully work yet)
authormand1nga <mand1nga@xonotic.org>
Tue, 9 Aug 2011 03:45:46 +0000 (00:45 -0300)
committermand1nga <mand1nga@xonotic.org>
Tue, 9 Aug 2011 03:45:46 +0000 (00:45 -0300)
qcsrc/server/bot/havocbot/role_assault.qc

index e5e3bdb6cbcaffdcf026f6caaa279f68cb704f95..57380dd038db1160c7053ef125a930dbb5e5c0ed 100644 (file)
@@ -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;
+                       }
                }
        }
 }