]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh
Merge branch 'master' into Mario/csqc_muzzleflash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / onslaught / onslaught.qh
1 #pragma once
2
3 #include <common/mapinfo.qh>
4
5 CLASS(Onslaught, Gametype)
6     INIT(Onslaught)
7     {
8         this.gametype_init(this, _("Onslaught"),"ons","g_onslaught",GAMETYPE_FLAG_TEAMPLAY,"","pointlimit=1 timelimit=20",_("Capture control points to reach and destroy the enemy generator"));
9     }
10     METHOD(Onslaught, m_generate_mapinfo, void(Gametype this, string v))
11     {
12         if(v == "onslaught_generator")
13             MapInfo_Map_supportedGametypes |= this.m_flags;
14     }
15     METHOD(Onslaught, m_configuremenu, void(Gametype this, entity menu, void(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip) returns))
16     {
17         TC(Gametype, this);
18         returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
19     }
20     ATTRIB(Onslaught, m_legacydefaults, string, "20 0");
21 ENDCLASS(Onslaught)
22 REGISTER_GAMETYPE(ONSLAUGHT, NEW(Onslaught));
23
24 #ifdef GAMEQC
25 REGISTER_NET_LINKED(ENT_CLIENT_GENERATOR)
26 REGISTER_NET_LINKED(ENT_CLIENT_CONTROLPOINT_ICON)
27 #endif
28
29 #ifdef SVQC
30 IntrusiveList g_onsshields;
31 STATIC_INIT(g_onsshields) { g_onsshields = IL_NEW(); }
32 #endif
33
34 #ifdef CSQC
35 IntrusiveList g_onsgenerators;
36 STATIC_INIT(g_onsgenerators) { g_onsgenerators = IL_NEW(); }
37 #endif