set g_monsters_typefrag 1
set g_monsters_healthbars 1 "Show health bars above monsters"
set g_monsters_target_range 2000
+set g_monsters_target_infront 0 "Only find targets infront of the monster"
set g_monsters_respawn 1 "Enable monster respawning"
set g_monsters_respawn_delay 20 "Monsters respawn in this amount of seconds"
set g_monsters_score_kill 1 "Get this many points for killing a naturally spawned monster"
float autocvar_g_monsters_max;
float autocvar_g_monsters_max_perplayer;
float autocvar_g_monsters_target_range;
+float autocvar_g_monsters_target_infront;
float autocvar_g_monsters_typefrag;
float autocvar_g_monsters_owners;
float autocvar_g_monsters_miniboss_chance;
if not(IsDifferentTeam(targ, ent))
return FALSE; // enemy is on our team
+
+ if(autocvar_g_monsters_target_infront)
+ if(ent.enemy != targ)
+ {
+ float dot;
+
+ makevectors (ent.angles);
+ dot = normalize (targ.origin - ent.origin) * v_forward;
+
+ if(dot <= 0.3)
+ return FALSE;
+ }
return TRUE;
}