From: terencehill Date: Thu, 2 Mar 2017 19:29:59 +0000 (+0100) Subject: Fix bots ignoring dropped weapons X-Git-Tag: xonotic-v0.8.2~159 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=73e097bfff6043bac4f67f3ac14d7d881cd3b8b2;p=xonotic%2Fxonotic-data.pk3dir.git Fix bots ignoring dropped weapons --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 5ddb0f74b..4f52f8b7a 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -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'); diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 6e40d16b8..d68256628 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -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)