From 0212f47b226ccbb949506a17889b65054c163d55 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 22 Jan 2018 16:41:40 +0100 Subject: [PATCH] Get rid of a useless variable, there's the autocvar --- qcsrc/server/bot/default/aim.qc | 5 ++--- qcsrc/server/bot/default/bot.qc | 2 -- qcsrc/server/bot/default/bot.qh | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) 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)) -- 2.39.2