#include "roles.qh"
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
#include "havocbot.qh"
#include "../cvars.qh"
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
}
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;
}
ratingscale = ratingscale * 0.00005; // enemies are rated around 20000 already
float t;
- FOREACH_CLIENT(IS_PLAYER(it) && bot_shouldattack(this, it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && bot_shouldattack(this, it), {
// TODO: Merge this logic with the bot_shouldattack function
if(vdist(it.origin - org, <, 100) || vdist(it.origin - org, >, sradius))
continue;
ratingscale *= t;
if (ratingscale > 0)
navigation_routerating(this, it, ratingscale * BOT_RATING_ENEMY, 2000);
- ));
+ });
}
// legacy bot role for standard gamemodes