Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
clanarena.qh
Go to the documentation of this file.
1#pragma once
2
3#include <common/mapinfo.qh>
4#ifdef CSQC
5 #include "cl_clanarena.qh"
6#endif
7
10 {
11 this.gametype_init(this, _("Clan Arena"),"ca","g_ca",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=10 teams=2 leadlimit=6",_("Kill all enemy teammates to win the round"));
12 }
13 METHOD(ClanArena, m_parse_mapinfo, bool(string k, string v))
14 {
15 if (!k)
16 {
17 cvar_set("g_ca_teams", cvar_defstring("g_ca_teams"));
18 return true;
19 }
20 switch (k)
21 {
22 case "teams":
23 cvar_set("g_ca_teams", v);
24 return true;
25 }
26 return false;
27 }
28 METHOD(ClanArena, 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(ClanArena, m_setTeams, void(string sa))
35 {
36 cvar_set("g_ca_teams", sa);
37 }
38 METHOD(ClanArena, 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_ca_teams_override", _("The amount of rounds won needed before the match will end"));
42 }
43#ifdef CSQC
44 ATTRIB(ClanArena, m_modicons, void(vector myPos, vector mySize, bool should_draw), HUD_Mod_CA);
45 ATTRIB(ClanArena, m_modicons_export, void(int fh), HUD_Mod_CA_Export);
46#endif
47 ATTRIB(ClanArena, m_legacydefaults, string, "10 20 0");
50#define g_ca IS_GAMETYPE(CA)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void HUD_Mod_CA(vector myPos, vector mySize, bool should_draw)
void HUD_Mod_CA_Export(int fh)
virtual void m_setTeams()
Definition clanarena.qh:34
virtual void m_configuremenu()
Definition clanarena.qh:38
virtual void m_isAlwaysSupported()
Definition clanarena.qh:28
virtual void m_parse_mapinfo()
Definition clanarena.qh:13
string m_legacydefaults
Definition clanarena.qh:47
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