if(!autocvar_g_monsters) { Monster_Remove(this); return false; }
if(!(this.spawnflags & MONSTERFLAG_RESPAWNED))
- {
IL_PUSH(g_monsters, this);
- IL_PUSH(g_damagedbycontents, this);
- }
if(check_appear && Monster_Appear_Check(this, mon_id)) { return true; } // return true so the monster isn't removed
this.bot_attack = true;
this.iscreature = true;
this.teleportable = true;
+ if(!this.damagedbycontents)
+ IL_PUSH(g_damagedbycontents, this);
this.damagedbycontents = true;
this.monsterid = mon_id;
this.event_damage = Monster_Damage;
.void(entity this, entity player) init_for_player;
-IntrusiveList g_damagedbycontents;
-STATIC_INIT(g_damagedbycontents) { g_damagedbycontents = IL_NEW(); }
-
IntrusiveList g_monsters;
STATIC_INIT(g_monsters) { g_monsters = IL_NEW(); }
IntrusiveList g_bot_dodge;
STATIC_INIT(g_bot_dodge) { g_bot_dodge = IL_NEW(); }
+
+IntrusiveList g_damagedbycontents;
+STATIC_INIT(g_damagedbycontents) { g_damagedbycontents = IL_NEW(); }
void WarpZone_PostInitialize_Callback()
{
// create waypoint links for warpzones
- for(entity e = warpzone_first; e; e = e.warpzone_next)
- //for(entity e = NULL; (e = find(e, classname, "trigger_warpzone")); )
+ //for(entity e = warpzone_first; e; e = e.warpzone_next)
+ for(entity e = NULL; (e = find(e, classname, "trigger_warpzone")); )
{
vector src, dst;
src = (e.absmin + e.absmax) * 0.5;