]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/havocbot/roles.qc
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / havocbot / roles.qc
index a4ca874f927be805ff09f36eefe043ed687414e1..f57a18fed6c39a1bb4a5d7b3e63506996d817d13 100644 (file)
@@ -23,13 +23,13 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float
        {
                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;