set g_monsters_healthbars 1 "Show health bars above monsters"
set g_monsters_giants_only 0
set g_monsters_nogiants 1
+set g_monsters_target_range 2000
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_giants_only;
+float autocvar_g_monsters_target_range;
float autocvar_g_monsters_typefrag;
float autocvar_g_monsters_owners;
float autocvar_g_monsters_miniboss_chance;
traceline(ent.origin, targ.origin, FALSE, ent);
- if(vlen(targ.origin - ent.origin) >= 2000)
+ if(vlen(targ.origin - ent.origin) >= ent.target_range)
return FALSE; // enemy is too far away
if(trace_ent != targ)
self.pos1 = self.origin;
self.pos2 = self.angles;
+ if not(self.target_range)
+ self.target_range = autocvar_g_monsters_target_range;
+
if not(self.respawntime)
self.respawntime = autocvar_g_monsters_respawn_delay;