From: terencehill Date: Thu, 29 Dec 2016 15:22:30 +0000 (+0100) Subject: Fix wrong checks causing bots to ignore dropped weapons (and enemies in the air)... X-Git-Tag: xonotic-v0.8.2~343^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d43e25801f5792271945ca87802a175fa11f1027;p=xonotic%2Fxonotic-data.pk3dir.git Fix wrong checks causing bots to ignore dropped weapons (and enemies in the air) when they look for a goal --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index 677ef578e..536c8b205 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -34,7 +34,7 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float traceline(o, o + '0 0 -1500', true, NULL); d = pointcontents(trace_endpos + '0 0 1'); - if(d & CONTENT_WATER || d & CONTENT_SLIME || d & CONTENT_LAVA) + if(d == CONTENT_WATER || d == CONTENT_SLIME || d == CONTENT_LAVA) continue; if(tracebox_hits_trigger_hurt(it.origin, it.mins, it.maxs, trace_endpos)) continue; @@ -145,12 +145,12 @@ void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org continue; // not falling - if((IS_ONGROUND(it)) == 0) + if(!IS_ONGROUND(it)) { traceline(it.origin, it.origin + '0 0 -1500', true, NULL); t = pointcontents(trace_endpos + '0 0 1'); if(t != CONTENT_SOLID ) - if(t & CONTENT_WATER || t & CONTENT_SLIME || t & CONTENT_LAVA) + if(t == CONTENT_WATER || t == CONTENT_SLIME || t == CONTENT_LAVA) continue; if(tracebox_hits_trigger_hurt(it.origin, it.mins, it.maxs, trace_endpos)) continue;