From: terencehill Date: Fri, 20 Jan 2017 15:46:03 +0000 (+0100) Subject: Maybe it works if I initialize it properly... X-Git-Tag: xonotic-v0.8.2~278 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f5d93d0d641523e2c8a2d860c6a777df19fdfabb;p=xonotic%2Fxonotic-data.pk3dir.git Maybe it works if I initialize it properly... --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index d18beab57..f57a18fed 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -16,20 +16,20 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius) { float rating, d, discard, friend_distance, enemy_distance; - vector o = '0 0 0'; + vector o; ratingscale = ratingscale * 0.0001; // items are rated around 10000 already IL_EACH(g_items, it.bot_pickup, { rating = 0; + o = (it.absmin + it.absmax) * 0.5; if(!it.solid || vdist(o - org, >, sradius) || (it == this.ignoregoal && time < this.ignoregoaltime) ) continue; // Check if the item can be picked up safely if(it.classname == "droppedweapon") { - o = (it.absmin + it.absmax) * 0.5; traceline(o, o + '0 0 -1500', true, NULL); d = pointcontents(trace_endpos + '0 0 1'); @@ -51,7 +51,6 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float if(teamplay) { - o = (it.absmin + it.absmax) * 0.5; friend_distance = 10000; enemy_distance = 10000; discard = false;