From: Mario Date: Sat, 22 Oct 2016 17:57:45 +0000 (+1000) Subject: Tweak a few things X-Git-Tag: xonotic-v0.8.2~474^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F363%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Tweak a few things --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 72e79d58a..b8c3bab21 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index ee5cda197..52153fcd7 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -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(); } diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 6decb2e70..0c36a77c5 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -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;