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
8
9MUTATOR_HOOKFUNCTION(melee_only, SetWeaponArena)
10{
11 // turn weapon arena off
12 M_ARGV(0, string) = "off";
13}
14
15MUTATOR_HOOKFUNCTION(melee_only, SetWeaponStay)
16{
17 // turn weapon stay off
18 M_ARGV(0, int) = 0;
19}
20
21MUTATOR_HOOKFUNCTION(melee_only, ForbidRandomStartWeapons)
22{
23 return true;
24}
25
26MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
27{
28 return true;
29}
30
31MUTATOR_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
45MUTATOR_HOOKFUNCTION(melee_only, BuildMutatorsString)
46{
47 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":MeleeOnly");
48}
49
50MUTATOR_HOOKFUNCTION(melee_only, BuildMutatorsPrettyString)
51{
52 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Melee only Arena");
53}
const int CBC_ORDER_LAST
Definition base.qh:11
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define M_ARGV(x, type)
Definition events.qh:17
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define WEPSET(id)
Definition all.qh:47
WepSet start_weapons
Definition world.qh:79
float start_ammo_shells
Definition world.qh:83
float warmup_start_ammo_shells
Definition world.qh:101
WepSet warmup_start_weapons
Definition world.qh:97