Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
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
7
bool
autocvar_sv_q3compat_changehitbox
;
8
9
bool
DoesQ3ARemoveThisEntity
(
entity
this
);
10
11
.int
fragsfilter_cnt
;
12
13
/* We tell the ammo spawnfunc which weapon will use the ammo so it can
14
* calculate the amount required for the number of shots in the count field,
15
* and so the type can be looked up rather than specified in quake3.qc
16
*/
17
// Ammo only (based on SPAWNFUNC_ITEM)
18
#define SPAWNFUNC_Q3AMMO(classname, xonwep, ...) \
19
spawnfunc(classname) \
20
{ \
21
__VA_OPT__(this.count *= (__VA_ARGS__);) \
22
if(this.count && (xonwep).ammo_type != RES_NONE) \
23
SetResource(this, (xonwep).ammo_type, rint(this.count * GetAmmoConsumption(xonwep))); \
24
SPAWNFUNC_BODY(GetAmmoItem((xonwep).ammo_type)) \
25
}
26
27
// Weapon only (based on SPAWNFUNC_WEAPON)
28
#define SPAWNFUNC_Q3WEAPON(classname, xonwep, ...) \
29
spawnfunc(classname) \
30
{ \
31
__VA_OPT__(this.count *= (__VA_ARGS__);) \
32
weapon_defaultspawnfunc(this, xonwep); \
33
}
34
35
// Weapon & ammo
36
#define SPAWNFUNC_Q3(weapon_classname, ammo_classname, xonwep, ...) \
37
SPAWNFUNC_Q3WEAPON(weapon_classname, xonwep, __VA_ARGS__) \
38
SPAWNFUNC_Q3AMMO(ammo_classname, xonwep, __VA_ARGS__)
39
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
q3compat
q3compat
Definition
quake3.qc:59
autocvar_sv_q3compat_changehitbox
bool autocvar_sv_q3compat_changehitbox
Definition
quake3.qh:7
DoesQ3ARemoveThisEntity
bool DoesQ3ARemoveThisEntity(entity this)
Definition
quake3.qc:360
fragsfilter_cnt
int fragsfilter_cnt
Definition
quake3.qh:11
server
compat
quake3.qh
Generated on
for Xonotic QuakeC by
1.14.0