Xonotic
invasion.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <common/mapinfo.qh>
4 
7  {
8  this.gametype_init(this, _("Invasion"),"inv","g_invasion",GAMETYPE_FLAG_USEPOINTS,"","pointlimit=50 teams=0 type=0",_("Survive against waves of monsters"));
9  }
10  METHOD(Invasion, m_parse_mapinfo, bool(string k, string v))
11  {
12  switch (k) {
13  case "teams":
14  cvar_set("g_invasion_teams", v);
15  return true;
16  case "type":
17  cvar_set("g_invasion_type", v);
18  return true;
19  }
20  return false;
21  }
22  METHOD(Invasion, m_generate_mapinfo, void(Gametype this, string v))
23  {
24  if(v == "invasion_spawnpoint")
26  }
27  METHOD(Invasion, 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))
28  {
29  TC(Gametype, this);
30  returns(menu, _("Point limit:"), 50, 500, 10, string_null, string_null, string_null);
31  }
33 REGISTER_GAMETYPE(INVASION, NEW(Invasion));
string string_null
Definition: nil.qh:9
#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
#define INIT(cname)
Definition: oo.qh:198
int MapInfo_Map_supportedGametypes
Definition: mapinfo.qh:13
#define TC(T, sym)
Definition: _all.inc:82
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(INVASION, NEW(Invasion))