X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fdefault%2Fhavocbot%2Froles.qc;h=6d0b3c6a1cae803294d4adb588868ab6da8dba94;hp=aa1884a33592e4634954165bb2cd2d53f81ea666;hb=9e113dae328809b5e7432f434649a35ebb185a52;hpb=636011bb12cd305cafb4e130690fa0fa6fa6405b diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index aa1884a33..6d0b3c6a1 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -88,8 +88,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 @@ -98,9 +99,7 @@ void havocbot_goalrating_items(entity this, float ratingscale, vector org, float } else { - // Ignore items under water - // TODO: can't .waterlevel be used here? - 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; }