]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qh
Merge branch 'master' into terencehill/less_entities
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / onslaught / onslaught.qh
index 4ee4534001ddba51d1f1524f49b614d294c8b912..3e7dece709b3b2e35bb665c34360bfa3bc0327a0 100644 (file)
@@ -1,5 +1,26 @@
 #pragma once
 
+#include <common/mapinfo.qh>
+
+CLASS(Onslaught, Gametype)
+    INIT(Onslaught)
+    {
+        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"));
+    }
+    METHOD(Onslaught, m_generate_mapinfo, void(Gametype this, string v))
+    {
+        if(v == "onslaught_generator")
+            MapInfo_Map_supportedGametypes |= this.m_flags;
+    }
+    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))
+    {
+        TC(Gametype, this);
+        returns(menu, _("Point limit:"),    50,  500, 10, string_null,                 string_null,                    string_null);
+    }
+    ATTRIB(Onslaught, m_legacydefaults, string, "20 0");
+ENDCLASS(Onslaught)
+REGISTER_GAMETYPE(ONSLAUGHT, NEW(Onslaught));
+
 #ifdef GAMEQC
 REGISTER_NET_LINKED(ENT_CLIENT_GENERATOR)
 REGISTER_NET_LINKED(ENT_CLIENT_CONTROLPOINT_ICON)