From: terencehill Date: Mon, 31 Jul 2017 12:56:41 +0000 (+0200) Subject: Allow bots to pick up underwater items X-Git-Tag: xonotic-v0.8.5~2378^2~104 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=251ae75e6556b3bbcb9d4d7c327695ebc84b1eb8;p=xonotic%2Fxonotic-data.pk3dir.git Allow bots to pick up underwater items --- diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index a0dc30693..5de3f30a8 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -85,8 +85,9 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float continue; traceline(o, o + '0 0 -1500', true, NULL); - if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(trace_endpos + '0 0 1')) & DPCONTENTS_LIQUIDSMASK) + if(IN_LAVA(trace_endpos + '0 0 1')) continue; + // this tracebox_hits_trigger_hurt call isn't needed: // dropped weapons are removed as soon as they fall on a trigger_hurt // and can't be rated while they are in the air @@ -95,8 +96,7 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float } else { - // Ignore items under water - if(Mod_Q1BSP_SuperContentsFromNativeContents(pointcontents(it.origin + ((it.mins + it.maxs) * 0.5))) & DPCONTENTS_LIQUIDSMASK) + if(IN_LAVA(it.origin + (it.mins + it.maxs) * 0.5)) continue; }