Xonotic
domination.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <common/mapinfo.qh>
4 
5 #ifdef CSQC
6 void HUD_Mod_Dom(vector pos, vector mySize);
7 void HUD_Mod_Dom_Export(int fh);
8 #endif
11  {
12  this.gametype_init(this, _("Domination"),"dom","g_domination",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=200 teams=2 leadlimit=0",_("Capture and defend all the control points to win"));
13  }
14  METHOD(Domination, m_parse_mapinfo, bool(string k, string v))
15  {
16  if (!k) {
17  cvar_set("g_domination_default_teams", cvar_defstring("g_domination_default_teams"));
18  return true;
19  }
20  switch (k) {
21  case "teams":
22  cvar_set("g_domination_default_teams", v);
23  return true;
24  }
25  return false;
26  }
27  METHOD(Domination, m_generate_mapinfo, void(Gametype this, string v))
28  {
29  if(v == "dom_controlpoint")
31  }
32  METHOD(Domination, 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))
33  {
34  TC(Gametype, this);
35  returns(menu, _("Point limit:"), 50, 500, 10, "g_domination_point_limit", "g_domination_teams_override", _("The amount of points needed before the match will end"));
36  }
37 #ifdef CSQC
38  ATTRIB(Domination, m_modicons, void(vector pos, vector mySize), HUD_Mod_Dom);
39  ATTRIB(Domination, m_modicons_export, void(int fh), HUD_Mod_Dom_Export);
40 #endif
41  ATTRIB(Domination, m_legacydefaults, string, "200 20 0");
43 REGISTER_GAMETYPE(DOMINATION, NEW(Domination));
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
int m_flags
Definition: mapinfo.qh:27
const int GAMETYPE_FLAG_TEAMPLAY
Definition: mapinfo.qh:19
void HUD_Mod_Dom(vector myPos, vector mySize)
#define ATTRIB(...)
Definition: oo.qh:136
void HUD_Mod_Dom_Export(int fh)
Definition: cl_domination.qc:6
#define INIT(cname)
Definition: oo.qh:198
int MapInfo_Map_supportedGametypes
Definition: mapinfo.qh:13
#define TC(T, sym)
Definition: _all.inc:82
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
const int GAMETYPE_FLAG_USEPOINTS
Definition: mapinfo.qh:20
#define ENDCLASS(cname)
Definition: oo.qh:269
REGISTER_GAMETYPE(DOMINATION, NEW(Domination))