4 #define Q3COMPAT_ARENA BIT(0)
5 #define Q3COMPAT_DEFI BIT(1)
7 bool DoesQ3ARemoveThisEntity(entity this);
11 // The ammo spawnfunc knows which weapon will use the ammo so it can look up the type
12 // and calculate the amount required for the number of shots in the count field.
13 #define _SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \
15 SetResource(this, xonwep.ammo_type, this.count * GetAmmoConsumptionPrimary(xonwep.netname)); \
16 spawnfunc_body(GetAmmoItem(xonwep.ammo_type));
18 // Ammo only, unconditional
19 #define SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \
20 spawnfunc(ammo_classname) \
22 _SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \
25 // Ammo only, conditional
26 #define SPAWNFUNC_Q3AMMO_COND(ammo_classname, cond, xonwep1, xonwep0) \
27 spawnfunc(ammo_classname) \
29 entity xonwep = (cond) ? xonwep1 : xonwep0; \
30 _SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \
33 // Weapon & ammo, unconditional
34 #define SPAWNFUNC_Q3(weapon_classname, ammo_classname, xonwep) \
35 SPAWNFUNC_WEAPON(weapon_classname, xonwep) \
36 SPAWNFUNC_Q3AMMO(ammo_classname, xonwep)
38 // Weapon & ammo, conditional
39 #define SPAWNFUNC_Q3_COND(weapon_classname, ammo_classname, cond, xonwep1, xonwep0) \
40 SPAWNFUNC_WEAPON_COND(weapon_classname, cond, xonwep1, xonwep0) \
41 SPAWNFUNC_Q3AMMO_COND(ammo_classname, cond, xonwep1, xonwep0)