]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of a useless variable, there's the autocvar
authorterencehill <piuntn@gmail.com>
Mon, 22 Jan 2018 15:41:40 +0000 (16:41 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 22 Jan 2018 15:41:40 +0000 (16:41 +0100)
qcsrc/server/bot/default/aim.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/bot/default/bot.qh

index 7441ce7bcab56cfafd3cf9e1ac8b6b68eab9385d..5ad1295f990f0b3d16be6b989e3263e4b17b3466 100644 (file)
@@ -132,9 +132,8 @@ bool bot_shouldattack(entity this, entity targ)
                if(targ.team==0)
                        return false;
        }
-       else if(bot_ignore_bots)
-               if(IS_BOT_CLIENT(targ))
-                       return false;
+       else if (autocvar_bot_ignore_bots && IS_BOT_CLIENT(targ))
+               return false;
 
        if (!targ.takedamage)
                return false;
index af238029abd85042eb7e72e8f2de43f0a0c6dd94..98a5217613b0de0125aebcd846433f3651b455a3 100644 (file)
@@ -729,8 +729,6 @@ void bot_serverframe()
                        botframe_nextthink = time + 10;
        }
 
-       bot_ignore_bots = autocvar_bot_ignore_bots;
-
        if(botframe_spawnedwaypoints)
        {
                if(autocvar_waypoint_benchmark)
index ea37ccf8ff6d417833b365aaad3b4e20ecaff1a3..ca567181bb13fd29331a6dd4c10a37d65f2b2c56 100644 (file)
@@ -76,7 +76,6 @@ float botframe_spawnedwaypoints;
 float botframe_nextthink;
 float botframe_nextdangertime;
 float bot_cvar_nextthink;
-float bot_ignore_bots; // let bots not attack other bots (only works in non-teamplay)
 
 int _content_type;
 #define IN_LAVA(pos) (_content_type = pointcontents(pos), (_content_type == CONTENT_LAVA || _content_type == CONTENT_SLIME))