]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/havocbot/roles.qc
Merge branch 'master' into Mario/invasion_types
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / havocbot / roles.qc
index 675dd036b7e7151dfdf100c98de66b8a242ea0f3..94aed9c96e1219333a5c792572b7a33e74a9a0cd 100644 (file)
@@ -1,5 +1,7 @@
 #include "roles.qh"
 
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
 #include "havocbot.qh"
 
 #include "../cvars.qh"
@@ -168,7 +170,7 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org
        ratingscale = ratingscale * 0.00005; // enemies are rated around 20000 already
 
        float t;
-       FOREACH_CLIENT(IS_PLAYER(it) && bot_shouldattack(this, it), LAMBDA(
+       FOREACH_CLIENT(IS_PLAYER(it) && bot_shouldattack(this, it), {
                // TODO: Merge this logic with the bot_shouldattack function
                if(vdist(it.origin - org, <, 100) || vdist(it.origin - org, >, sradius))
                        continue;
@@ -191,7 +193,7 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org
                ratingscale *= t;
                if (ratingscale > 0)
                        navigation_routerating(this, it, ratingscale * BOT_RATING_ENEMY, 2000);
-       ));
+       });
 }
 
 // legacy bot role for standard gamemodes