Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
mayhem.qh
Go to the documentation of this file.
1#pragma once
2
5#include <common/mapinfo.qh>
6
9 {
10 this.gametype_init(this, _("Mayhem"),"mayhem","g_mayhem",GAMETYPE_FLAG_USEPOINTS,"","timelimit=15 pointlimit=1000 leadlimit=0",_("Compete for the most damage dealt and frags in this chaotic mayhem"));
11 }
12 METHOD(mayhem, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
13 {
14 return true;
15 }
17 {
18 if(!(MapInfo_Map_supportedGametypes & this.gametype_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.gametype_flags))
19 {
20 return true;
21 }
22 if(!(MapInfo_Map_supportedGametypes & this.gametype_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH.gametype_flags))
23 {
24 return true;
25 }
26 return false;
27 }
28 METHOD(mayhem, 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))
29 {
30 TC(Gametype, this);
31 returns(menu, _("Point limit:"), 200, 2000, 100, "g_mayhem_point_limit", string_null, _("How much score is needed before the match will end"));
32 }
33 ATTRIB(mayhem, m_legacydefaults, string, "1000 20 0");
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
virtual void gametype_init()
Definition mapinfo.qh:117
virtual void m_isForcedSupported()
Definition mayhem.qh:16
mayhem()
Definition mayhem.qh:8
virtual void m_configuremenu()
Definition mayhem.qh:28
virtual void m_isAlwaysSupported()
Definition mayhem.qh:12
string m_legacydefaults
Definition mayhem.qh:33
#define TC(T, sym)
Definition _all.inc:82
vector MapInfo_Map_supportedGametypes
Definition mapinfo.qh:13
const int GAMETYPE_FLAG_USEPOINTS
Definition mapinfo.qh:20
#define REGISTER_GAMETYPE(NAME, inst)
Definition mapinfo.qh:149
vector gametype_flags
Definition mapinfo.qh:28
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