Xonotic
quake3.qh
Go to the documentation of this file.
1 #pragma once
2 
3 int q3compat = 0;
4 #define Q3COMPAT_ARENA BIT(0)
5 #define Q3COMPAT_DEFI BIT(1)
6 
8 
10 int GetAmmoConsumptionQ3(string netname);
11 
13 
14 /* We tell the ammo spawnfunc which weapon will use the ammo so it can
15  * calculate the amount required for the number of shots in the count field,
16  * and so the type can be looked up rather than specified in quake3.qc
17  */
18 // Ammo only, unconditional
19 #define SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \
20  spawnfunc(ammo_classname) \
21  { \
22  if(this.count && xonwep.ammo_type) \
23  SetResource(this, xonwep.ammo_type, this.count * GetAmmoConsumptionQ3(xonwep.netname)); \
24  SPAWNFUNC_BODY(GetAmmoItem(xonwep.ammo_type)) \
25  }
26 
27 // Ammo only, conditional
28 #define SPAWNFUNC_Q3AMMO_COND(ammo_classname, cond, xonwep1, xonwep0) \
29  SPAWNFUNC_Q3AMMO(ammo_classname, (cond ? xonwep1 : xonwep0))
30 
31 // Weapon & ammo, unconditional
32 #define SPAWNFUNC_Q3(weapon_classname, ammo_classname, xonwep) \
33  SPAWNFUNC_WEAPON(weapon_classname, xonwep) \
34  SPAWNFUNC_Q3AMMO(ammo_classname, xonwep)
35 
36 // Weapon & ammo, conditional
37 #define SPAWNFUNC_Q3_COND(weapon_classname, ammo_classname, cond, xonwep1, xonwep0) \
38  SPAWNFUNC_WEAPON_COND(weapon_classname, cond, xonwep1, xonwep0) \
39  SPAWNFUNC_Q3AMMO_COND(ammo_classname, cond, xonwep1, xonwep0)
40 
bool DoesQ3ARemoveThisEntity(entity this)
Definition: quake3.qc:282
entity() spawn
string netname
Definition: powerups.qc:20
int q3compat
Definition: quake3.qh:3
int GetAmmoConsumptionQ3(string netname)
Definition: quake3.qc:337
bool autocvar_sv_q3compat_changehitbox
Definition: quake3.qh:7
int fragsfilter_cnt
Definition: quake3.qh:12