Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
keepaway.qh
Go to the documentation of this file.
1#pragma once
2
3#include <common/mapinfo.qh>
4#ifdef CSQC
5 #include "cl_keepaway.qh"
6#endif
7
10 {
11 this.gametype_init(this, _("Keepaway"),"ka","g_keepaway",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=30",_("Hold the ball to get points for kills"));
12 }
13 METHOD(Keepaway, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
14 {
15 return true;
16 }
17 METHOD(Keepaway, 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))
18 {
19 TC(Gametype, this);
20 returns(menu, _("Point limit:"), 5, 100, 5, "g_keepaway_point_limit", string_null, _("The amount of points needed before the match will end"));
21 }
22#ifdef CSQC
23 ATTRIB(Keepaway, m_modicons, void(vector myPos, vector mySize, bool should_draw), HUD_Mod_Keepaway);
24#endif
27
28#ifdef GAMEQC
29const int KA_CARRYING = BIT(0);
30#endif
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void HUD_Mod_Keepaway(vector pos, vector mySize, bool should_draw)
virtual void gametype_init()
Definition mapinfo.qh:117
virtual void m_configuremenu()
Definition keepaway.qh:17
virtual void m_isAlwaysSupported()
Definition keepaway.qh:13
Keepaway()
Definition keepaway.qh:9
const int KA_CARRYING
Definition keepaway.qh:29
#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
string string_null
Definition nil.qh:9
#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