Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
freezetag.qh
Go to the documentation of this file.
1#pragma once
2
3#include <common/mapinfo.qh>
4#if defined(CSQC)
5 #include "cl_freezetag.qh"
6#endif
7
10 {
11 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"));
12 }
13 METHOD(FreezeTag, m_parse_mapinfo, bool(string k, string v))
14 {
15 if (!k)
16 {
17 cvar_set("g_freezetag_teams", cvar_defstring("g_freezetag_teams"));
18 return true;
19 }
20 switch (k)
21 {
22 case "teams":
23 cvar_set("g_freezetag_teams", v);
24 return true;
25 }
26 return false;
27 }
28 METHOD(FreezeTag, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
29 {
30 if(spawnpoints >= 8 && diameter > 3250)
31 return true;
32 return false;
33 }
34 METHOD(FreezeTag, m_setTeams, void(string sa))
35 {
36 cvar_set("g_freezetag_teams", sa);
37 }
38 METHOD(FreezeTag, 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))
39 {
40 TC(Gametype, this);
41 returns(menu, _("Round limit:"), 5, 100, 5, "fraglimit_override", "g_freezetag_teams_override", _("The amount of rounds won needed before the match will end"));
42 }
43#ifdef CSQC
44 ATTRIB(FreezeTag, m_modicons, void(vector myPos, vector mySize, bool should_draw), HUD_Mod_FreezeTag);
45 ATTRIB(FreezeTag, m_modicons_export, void(int fh), HUD_Mod_FreezeTag_Export);
46#endif
47 ATTRIB(FreezeTag, m_legacydefaults, string, "10 20 0");
50#define g_freezetag IS_GAMETYPE(FREEZETAG)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void HUD_Mod_FreezeTag(vector myPos, vector mySize, bool should_draw)
void HUD_Mod_FreezeTag_Export(int fh)
virtual void m_parse_mapinfo()
Definition freezetag.qh:13
virtual void m_configuremenu()
Definition freezetag.qh:38
virtual void m_isAlwaysSupported()
Definition freezetag.qh:28
string m_legacydefaults
Definition freezetag.qh:47
virtual void m_setTeams()
Definition freezetag.qh:34
virtual void gametype_init()
Definition mapinfo.qh:117
#define TC(T, sym)
Definition _all.inc:82
const int GAMETYPE_FLAG_USEPOINTS
Definition mapinfo.qh:20
#define REGISTER_GAMETYPE(NAME, inst)
Definition mapinfo.qh:149
const int GAMETYPE_FLAG_TEAMPLAY
Definition mapinfo.qh:19
void cvar_set(string name, string value)
const string cvar_defstring(string name)
#define NEW(cname,...)
Definition oo.qh:117
#define INIT(cname)
Definition oo.qh:210
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define ATTRIB(...)
Definition oo.qh:148
vector
Definition self.qh:92