From 22886a22ead2fe13dd8a8bf7b3117e2430d20569 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 21 Aug 2016 23:50:48 +1000 Subject: [PATCH 1/1] Intrusify onslaught shields --- qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh | 5 +++++ qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh index 01ba8e708..c863e2f71 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh @@ -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(); } diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc index 01aa023c4..643a02954 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc @@ -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; -- 2.39.2