From: Mario Date: Sun, 21 Aug 2016 13:50:48 +0000 (+1000) Subject: Intrusify onslaught shields X-Git-Tag: xonotic-v0.8.2~663^2~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=22886a22ead2fe13dd8a8bf7b3117e2430d20569;p=xonotic%2Fxonotic-data.pk3dir.git Intrusify onslaught shields --- 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;