]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bots ignoring dropped weapons
authorterencehill <piuntn@gmail.com>
Thu, 2 Mar 2017 19:29:59 +0000 (20:29 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 2 Mar 2017 19:29:59 +0000 (20:29 +0100)
qcsrc/server/bot/default/havocbot/roles.qc
qcsrc/server/weapons/throwing.qc

index 5ddb0f74b576ab0bcd8107dad86e1af96a5f6a27..4f52f8b7a47fbc00399235cc614869e26be374dc 100644 (file)
@@ -77,6 +77,8 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float
                // Check if the item can be picked up safely
                if(it.classname == "droppedweapon")
                {
+                       if(!IS_ONGROUND(it))
+                               continue;
                        traceline(o, o + '0 0 -1500', true, NULL);
 
                        d = pointcontents(trace_endpos + '0 0 1');
index 6e40d16b80e57ca538accb5aa67b26defa8ae268..d682566284b45d51e09fb2d43b07a57fce0e92a0 100644 (file)
@@ -20,10 +20,7 @@ void thrown_wep_think(entity this)
        {
                this.SendFlags |= ISF_LOCATION;
                this.oldorigin = this.origin;
-               this.bot_pickup = false;
        }
-       else
-               this.bot_pickup = true;
        this.owner = NULL;
        float timeleft = this.savenextthink - time;
        if(timeleft > 1)