]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tweak a few things 363/head
authorMario <mario@smbclan.net>
Sat, 22 Oct 2016 17:57:45 +0000 (03:57 +1000)
committerMario <mario@smbclan.net>
Sat, 22 Oct 2016 17:57:45 +0000 (03:57 +1000)
qcsrc/common/monsters/sv_monsters.qc
qcsrc/server/defs.qh
qcsrc/server/sv_main.qc

index 72e79d58ac60e563be638bc961dca1b0e76e7376..b8c3bab21e77240e82dcef113826ab1b5b96c751 100644 (file)
@@ -1296,10 +1296,7 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
        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
 
@@ -1327,6 +1324,8 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
        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;
index ee5cda197efbc7bc39948f12b97e751b3bbe879f..52153fcd7edeedaf2b7c3aec557103786fcca343 100644 (file)
@@ -421,9 +421,6 @@ const int MIF_GUIDED_CONFUSABLE = MIF_GUIDED_HEAT | MIF_GUIDED_AI;
 
 .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(); }
 
@@ -468,3 +465,6 @@ STATIC_INIT(g_bot_targets) { g_bot_targets = 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(); }
index 6decb2e70512855d569c54c74c5e870ef93110e4..0c36a77c5b7689665d101e1d676efe67af567e21 100644 (file)
@@ -403,8 +403,8 @@ LABEL(cvar_fail)
 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;