Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_melee_only.qc
Go to the documentation of this file.
1
#include "
sv_melee_only.qh
"
2
3
MUTATOR_HOOKFUNCTION
(melee_only, SetStartItems,
CBC_ORDER_LAST
)
4
{
5
start_ammo_shells
=
warmup_start_ammo_shells
= 0;
6
start_weapons
=
warmup_start_weapons
=
WEPSET
(SHOTGUN);
7
}
8
9
MUTATOR_HOOKFUNCTION
(melee_only, SetWeaponArena)
10
{
11
// turn weapon arena off
12
M_ARGV
(0,
string
) =
"off"
;
13
}
14
15
MUTATOR_HOOKFUNCTION
(melee_only, SetWeaponStay)
16
{
17
// turn weapon stay off
18
M_ARGV
(0,
int
) = 0;
19
}
20
21
MUTATOR_HOOKFUNCTION
(melee_only, ForbidRandomStartWeapons)
22
{
23
return
true
;
24
}
25
26
MUTATOR_HOOKFUNCTION
(melee_only, ForbidThrowCurrentWeapon)
27
{
28
return
true
;
29
}
30
31
MUTATOR_HOOKFUNCTION
(melee_only, FilterItemDefinition)
32
{
33
entity
definition =
M_ARGV
(0,
entity
);
34
35
switch
(definition)
36
{
37
case
ITEM_HealthSmall:
38
case
ITEM_ArmorSmall:
39
return
false
;
40
}
41
42
return
true
;
43
}
44
45
MUTATOR_HOOKFUNCTION
(melee_only, BuildMutatorsString)
46
{
47
M_ARGV
(0,
string
) =
strcat
(
M_ARGV
(0,
string
),
":MeleeOnly"
);
48
}
49
50
MUTATOR_HOOKFUNCTION
(melee_only, BuildMutatorsPrettyString)
51
{
52
M_ARGV
(0,
string
) =
strcat
(
M_ARGV
(0,
string
),
", Melee only Arena"
);
53
}
CBC_ORDER_LAST
const int CBC_ORDER_LAST
Definition
base.qh:11
MUTATOR_HOOKFUNCTION
#define MUTATOR_HOOKFUNCTION(...)
Definition
base.qh:335
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
M_ARGV
#define M_ARGV(x, type)
Definition
events.qh:17
strcat
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
sv_melee_only.qh
WEPSET
#define WEPSET(id)
Definition
all.qh:47
start_weapons
WepSet start_weapons
Definition
world.qh:79
start_ammo_shells
float start_ammo_shells
Definition
world.qh:83
warmup_start_ammo_shells
float warmup_start_ammo_shells
Definition
world.qh:101
warmup_start_weapons
WepSet warmup_start_weapons
Definition
world.qh:97
common
mutators
mutator
melee_only
sv_melee_only.qc
Generated on
for Xonotic QuakeC by
1.16.1