From: terencehill Date: Mon, 22 Jan 2018 15:41:40 +0000 (+0100) Subject: Get rid of a useless variable, there's the autocvar X-Git-Tag: xonotic-v0.8.5~2374 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0212f47b226ccbb949506a17889b65054c163d55;p=xonotic%2Fxonotic-data.pk3dir.git Get rid of a useless variable, there's the autocvar --- diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index 7441ce7bc..5ad1295f9 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -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; diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index af238029a..98a521761 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -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) diff --git a/qcsrc/server/bot/default/bot.qh b/qcsrc/server/bot/default/bot.qh index ea37ccf8f..ca567181b 100644 --- a/qcsrc/server/bot/default/bot.qh +++ b/qcsrc/server/bot/default/bot.qh @@ -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))