Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
nexball.qh
Go to the documentation of this file.
1#pragma once
2
3#include <common/mapinfo.qh>
4
5#ifdef CSQC
6void HUD_Mod_NexBall(vector pos, vector mySize);
7#endif
10 {
11 this.gametype_init(this, _("Nexball"),"nb","g_nexball",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_WEAPONARENA,"","timelimit=20 pointlimit=5 leadlimit=0",_("Shoot and kick the ball into the enemy's goal, keep your goal clean"));
12 }
13 METHOD(NexBall, m_generate_mapinfo, void(Gametype this, string v))
14 {
15 if(substring(v, 0, 8) == "nexball_" || substring(v, 0, 4) == "ball")
17 }
19 {
20 return true;
21 }
22 METHOD(NexBall, 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))
23 {
24 TC(Gametype, this);
25 returns(menu, _("Goal limit:"), 1, 50, 1, "g_nexball_goallimit", string_null, _("The amount of goals needed before the match will end"));
26 }
27#ifdef CSQC
28 ATTRIB(NexBall, m_modicons, void(vector pos, vector mySize), HUD_Mod_NexBall);
29#endif
30 ATTRIB(NexBall, m_legacydefaults, string, "5 20 0");
33#define g_nexball IS_GAMETYPE(NEXBALL)
34
35#ifdef GAMEQC
36const int NB_CARRYING = BIT(0);
37#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
virtual void gametype_init()
Definition mapinfo.qh:117
virtual void m_generate_mapinfo()
Definition nexball.qh:13
virtual void m_isTwoBaseMode()
Definition nexball.qh:18
string m_legacydefaults
Definition nexball.qh:30
virtual void m_configuremenu()
Definition nexball.qh:22
NexBall()
Definition nexball.qh:9
#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
const int GAMETYPE_FLAG_TEAMPLAY
Definition mapinfo.qh:19
const int GAMETYPE_FLAG_WEAPONARENA
Definition mapinfo.qh:24
vector gametype_flags
Definition mapinfo.qh:28
string substring(string s, float start, float length)
const int NB_CARRYING
Definition nexball.qh:36
void HUD_Mod_NexBall(vector pos, vector mySize)
Definition cl_nexball.qc:7
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