]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Intrusify onslaught shields
authorMario <mario@smbclan.net>
Sun, 21 Aug 2016 13:50:48 +0000 (23:50 +1000)
committerMario <mario@smbclan.net>
Sun, 21 Aug 2016 13:50:48 +0000 (23:50 +1000)
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc

index 01ba8e708c357f4f68d76e9a6621b137379255c1..c863e2f71fb264d25ba52809ad1f2edaa87d59ad 100644 (file)
@@ -3,6 +3,11 @@
 REGISTER_NET_LINKED(ENT_CLIENT_GENERATOR)
 REGISTER_NET_LINKED(ENT_CLIENT_CONTROLPOINT_ICON)
 
+#ifdef SVQC
+IntrusiveList g_onsshields;
+STATIC_INIT(g_onsshields) { g_onsshields = IL_NEW(); }
+#endif
+
 #ifdef CSQC
 IntrusiveList g_onsgenerators;
 STATIC_INIT(g_onsgenerators) { g_onsgenerators = IL_NEW(); }
index 01aa023c416b105ec82791cc30f634949965e58d..643a02954c336b02b7650462ee75dc7d06bd663d 100644 (file)
@@ -74,6 +74,7 @@ void ons_CaptureShield_Reset(entity this)
 void ons_CaptureShield_Spawn(entity generator, bool is_generator)
 {
        entity shield = new(ons_captureshield);
+       IL_PUSH(g_onsshields, shield);
 
        shield.enemy = generator;
        shield.team = generator.team;
@@ -229,7 +230,7 @@ void onslaught_updatelinks()
                }
                ons_ControlPoint_UpdateSprite(l);
        }
-       FOREACH_ENTITY_CLASS("ons_captureshield", true,
+       IL_EACH(g_onsshields, true,
        {
                it.team = it.enemy.team;
                it.colormap = it.enemy.colormap;