Xonotic
FreezeTag Class Reference
+ Inheritance diagram for FreezeTag:
+ Collaboration diagram for FreezeTag:

Public Member Functions

 ATTRIB (Gametype, netname, string)
 game type name as in cvar (with g_ prefix) More...
 
 ATTRIB (Gametype, mdl, string)
 game type short name More...
 
 ATTRIB (Gametype, message, string)
 human readable name More...
 
 ATTRIB (Gametype, model2, string)
 game type defaults More...
 
 ATTRIB (Gametype, gametype_description, string)
 game type description More...
 
 ATTRIB (Gametype, m_mutators, string)
 
 FreezeTag ::FreezeTag ()
 
virtual void FreezeTag ::m_configuremenu ()
 
virtual void FreezeTag ::m_isAlwaysSupported ()
 
virtual void FreezeTag ::m_parse_mapinfo ()
 
virtual void FreezeTag ::m_setTeams ()
 
virtual void Gametype ::describe ()
 
virtual void Gametype ::display ()
 
virtual void Gametype ::gametype_init ()
 
virtual void Gametype ::m_configuremenu ()
 
virtual void Gametype ::m_generate_mapinfo ()
 
virtual void Gametype ::m_isAlwaysSupported ()
 
virtual void Gametype ::m_isForcedSupported ()
 
virtual void Gametype ::m_isTwoBaseMode ()
 
virtual void Gametype ::m_parse_mapinfo ()
 

Public Attributes

bool frags = true
 does this gametype use a point limit? More...
 
int items = 0
 game type ID More...
 
bool m_hidelimits = false
 should this gametype display a score limit in the scoreboard? More...
 
int m_id = 0
 
string m_legacydefaults = "10 20 0"
 
int m_priority = 0
 game type priority in random selections More...
 
bool m_weaponarena = false
 does this gametype enforce its own weapon arena? More...
 
bool team = false
 does this gametype support teamplay? More...
 

Detailed Description

Definition at line 12 of file freezetag.qh.

Member Function Documentation

◆ ATTRIB() [1/6]

Gametype::ATTRIB ( Gametype  ,
netname  ,
string   
)
inherited

game type name as in cvar (with g_ prefix)

◆ ATTRIB() [2/6]

Gametype::ATTRIB ( Gametype  ,
mdl  ,
string   
)
inherited

game type short name

◆ ATTRIB() [3/6]

Gametype::ATTRIB ( Gametype  ,
message  ,
string   
)
inherited

human readable name

◆ ATTRIB() [4/6]

Gametype::ATTRIB ( Gametype  ,
model2  ,
string   
)
inherited

game type defaults

◆ ATTRIB() [5/6]

Gametype::ATTRIB ( Gametype  ,
gametype_description  ,
string   
)
inherited

game type description

◆ ATTRIB() [6/6]

Gametype::ATTRIB ( Gametype  ,
m_mutators  ,
string   
)
inherited

◆ FreezeTag ::FreezeTag()

FreezeTag::FreezeTag ::FreezeTag ( )
inline

Definition at line 13 of file freezetag.qh.

14  {
15  this.gametype_init(this, _("Freeze Tag"),"ft","g_freezetag",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill enemies to freeze them, stand next to frozen teammates to revive them; freeze all enemies to win"));
16  }
const int GAMETYPE_FLAG_TEAMPLAY
Definition: mapinfo.qh:19
const int GAMETYPE_FLAG_USEPOINTS
Definition: mapinfo.qh:20

◆ FreezeTag ::m_configuremenu()

virtual void FreezeTag::FreezeTag ::m_configuremenu ( )
inlinevirtual

Definition at line 40 of file freezetag.qh.

References TC.

41  {
42  TC(Gametype, this);
43  returns(menu, _("Frag limit:"), 5, 100, 5, "fraglimit_override", "g_freezetag_teams_override", _("The amount of frags needed before the match will end"));
44  }
#define TC(T, sym)
Definition: _all.inc:82

◆ FreezeTag ::m_isAlwaysSupported()

virtual void FreezeTag::FreezeTag ::m_isAlwaysSupported ( )
inlinevirtual

Definition at line 30 of file freezetag.qh.

31  {
32  if(spawnpoints >= 8 && diameter > 4096)
33  return true;
34  return false;
35  }

◆ FreezeTag ::m_parse_mapinfo()

virtual void FreezeTag::FreezeTag ::m_parse_mapinfo ( )
inlinevirtual

Definition at line 17 of file freezetag.qh.

References cvar_defstring(), and cvar_set().

18  {
19  if (!k) {
20  cvar_set("g_freezetag_teams", cvar_defstring("g_freezetag_teams"));
21  return true;
22  }
23  switch (k) {
24  case "teams":
25  cvar_set("g_freezetag_teams", v);
26  return true;
27  }
28  return false;
29  }
vector v
Definition: ent_cs.qc:116
+ Here is the call graph for this function:

◆ FreezeTag ::m_setTeams()

virtual void FreezeTag::FreezeTag ::m_setTeams ( )
inlinevirtual

Definition at line 36 of file freezetag.qh.

References cvar_set().

37  {
38  cvar_set("g_freezetag_teams", sa);
39  }
+ Here is the call graph for this function:

◆ Gametype ::describe()

virtual void Gametype::Gametype ::describe ( )
inlinevirtualinherited

Definition at line 89 of file mapinfo.qh.

References TC.

90  {
91  TC(Gametype, this);
92  return this.gametype_description;
93  }
#define TC(T, sym)
Definition: _all.inc:82

◆ Gametype ::display()

virtual void Gametype::Gametype ::display ( )
inlinevirtualinherited

Definition at line 95 of file mapinfo.qh.

References strcat(), and TC.

96  {
97  TC(Gametype, this);
98  returns(this.message, strcat("gametype_", this.mdl));
99  }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
string message
Definition: powerups.qc:19
#define TC(T, sym)
Definition: _all.inc:82
+ Here is the call graph for this function:

◆ Gametype ::gametype_init()

virtual void Gametype::Gametype ::gametype_init ( )
inlinevirtualinherited

Definition at line 101 of file mapinfo.qh.

References cons(), ENDCLASS, GAMETYPE_FLAG_HIDELIMITS, GAMETYPE_FLAG_PREFERRED, GAMETYPE_FLAG_PRIORITY, GAMETYPE_FLAG_TEAMPLAY, GAMETYPE_FLAG_USEPOINTS, GAMETYPE_FLAG_WEAPONARENA, m_flags, MAPINFO_TYPE_ALL, NULL, REGISTER_REGISTRY, REGISTRY, REGISTRY_CHECK, REGISTRY_DEFINE_GET, and REGISTRY_SORT().

102  {
103  this.netname = g_name;
104  this.mdl = sname;
105  this.message = hname;
106  this.team = (gflags & GAMETYPE_FLAG_TEAMPLAY);
107  this.m_mutators = cons(sname, mutators);
108  this.model2 = defaults;
109  this.gametype_description = gdescription;
110  this.frags = (gflags & GAMETYPE_FLAG_USEPOINTS);
111  this.m_priority = ((gflags & GAMETYPE_FLAG_PREFERRED) ? 2 : ((gflags & GAMETYPE_FLAG_PRIORITY) ? 1 : 0));
112  this.m_hidelimits = (gflags & GAMETYPE_FLAG_HIDELIMITS);
113  this.m_weaponarena = (gflags & GAMETYPE_FLAG_WEAPONARENA);
114 
115  // same as `1 << m_id`
116  MAPINFO_TYPE_ALL |= this.items = this.m_flags = (MAPINFO_TYPE_ALL + 1);
117  }
int MAPINFO_TYPE_ALL
Definition: mapinfo.qh:26
const int GAMETYPE_FLAG_HIDELIMITS
Definition: mapinfo.qh:23
bool m_hidelimits
should this gametype display a score limit in the scoreboard?
Definition: mapinfo.qh:44
string netname
Definition: powerups.qc:20
const int GAMETYPE_FLAG_WEAPONARENA
Definition: mapinfo.qh:24
int m_flags
Definition: mapinfo.qh:27
const int GAMETYPE_FLAG_TEAMPLAY
Definition: mapinfo.qh:19
bool frags
does this gametype use a point limit?
Definition: mapinfo.qh:42
string message
Definition: powerups.qc:19
const int GAMETYPE_FLAG_PREFERRED
Definition: mapinfo.qh:21
bool team
does this gametype support teamplay?
Definition: mapinfo.qh:40
bool m_weaponarena
does this gametype enforce its own weapon arena?
Definition: mapinfo.qh:46
const int GAMETYPE_FLAG_USEPOINTS
Definition: mapinfo.qh:20
ERASEABLE string cons(string a, string b)
Definition: string.qh:257
const int GAMETYPE_FLAG_PRIORITY
Definition: mapinfo.qh:22
int m_priority
game type priority in random selections
Definition: mapinfo.qh:52
int items
game type ID
Definition: mapinfo.qh:32
+ Here is the call graph for this function:

◆ Gametype ::m_configuremenu()

virtual void Gametype::Gametype ::m_configuremenu ( )
inlinevirtualinherited

Definition at line 83 of file mapinfo.qh.

References TC.

84  {
85  TC(Gametype, this);
86  returns(menu, _("Frag limit:"), 5, 100, 5, "fraglimit_override", string_null, _("The amount of frags needed before the match will end"));
87  }
string string_null
Definition: nil.qh:9
#define TC(T, sym)
Definition: _all.inc:82

◆ Gametype ::m_generate_mapinfo()

virtual void Gametype::Gametype ::m_generate_mapinfo ( )
inlinevirtualinherited

Definition at line 67 of file mapinfo.qh.

References TC.

68  {
69  TC(Gametype, this);
70  }
#define TC(T, sym)
Definition: _all.inc:82

◆ Gametype ::m_isAlwaysSupported()

virtual void Gametype::Gametype ::m_isAlwaysSupported ( )
inlinevirtualinherited

Definition at line 75 of file mapinfo.qh.

76  {
77  return false;
78  }

◆ Gametype ::m_isForcedSupported()

virtual void Gametype::Gametype ::m_isForcedSupported ( )
inlinevirtualinherited

Definition at line 79 of file mapinfo.qh.

80  {
81  return false;
82  }

◆ Gametype ::m_isTwoBaseMode()

virtual void Gametype::Gametype ::m_isTwoBaseMode ( )
inlinevirtualinherited

Definition at line 71 of file mapinfo.qh.

72  {
73  return false;
74  }

◆ Gametype ::m_parse_mapinfo()

virtual void Gametype::Gametype ::m_parse_mapinfo ( )
inlinevirtualinherited

Definition at line 63 of file mapinfo.qh.

64  {
65  return false;
66  }

Member Data Documentation

◆ frags

bool Gametype::frags = true
inherited

does this gametype use a point limit?

Definition at line 42 of file mapinfo.qh.

Referenced by _MapInfo_Map_ApplyGametype().

◆ items

int Gametype::items = 0
inherited

game type ID

Definition at line 32 of file mapinfo.qh.

◆ m_hidelimits

bool Gametype::m_hidelimits = false
inherited

should this gametype display a score limit in the scoreboard?

Definition at line 44 of file mapinfo.qh.

◆ m_id

int Gametype::m_id = 0
inherited

Definition at line 30 of file mapinfo.qh.

◆ m_legacydefaults

string FreezeTag::m_legacydefaults = "10 20 0"

Definition at line 49 of file freezetag.qh.

◆ m_priority

int Gametype::m_priority = 0
inherited

game type priority in random selections

Definition at line 52 of file mapinfo.qh.

◆ m_weaponarena

bool Gametype::m_weaponarena = false
inherited

does this gametype enforce its own weapon arena?

Definition at line 46 of file mapinfo.qh.

◆ team

bool Gametype::team = false
inherited

does this gametype support teamplay?

Definition at line 40 of file mapinfo.qh.

Referenced by _MapInfo_GetTeamPlayBool().


The documentation for this class was generated from the following file: