]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unused havocbot_gettarget
authorterencehill <piuntn@gmail.com>
Mon, 22 Aug 2022 15:28:43 +0000 (17:28 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 22 Aug 2022 15:28:43 +0000 (17:28 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 689f0c179ffcfc3ea65155ec04153bddb6ce1716..af108f14900f3fe02d121e2b6fb41e273b3b5510 100644 (file)
@@ -1275,26 +1275,6 @@ void havocbot_movetogoal(entity this)
        }
 }
 
-entity havocbot_gettarget(entity this, bool secondary)
-{
-       entity best = NULL;
-       vector eye = CENTER_OR_VIEWOFS(this);
-       IL_EACH(g_bot_targets, boolean((secondary) ? it.classname == "misc_breakablemodel" : it.classname != "misc_breakablemodel"),
-       {
-               vector v = CENTER_OR_VIEWOFS(it);
-               if(vdist(v - eye, <, autocvar_bot_ai_enemydetectionradius))
-               if(!best || vlen2(CENTER_OR_VIEWOFS(best) - eye) > vlen2(v - eye))
-               if(bot_shouldattack(this, it))
-               {
-                       traceline(eye, v, true, this);
-                       if (trace_ent == it || trace_fraction >= 1)
-                               best = it;
-               }
-       });
-
-       return best;
-}
-
 void havocbot_chooseenemy(entity this)
 {
        if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(this))
@@ -1348,7 +1328,7 @@ void havocbot_chooseenemy(entity this)
        while(true)
        {
                scan_secondary_targets = false;
-LABEL(scan_targets)
+               LABEL(scan_targets)
                IL_EACH(g_bot_targets, it.bot_attack,
                {
                        if(!scan_secondary_targets)