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
4
7
13
14MUTATOR_HOOKFUNCTION(melee_only, SetWeaponArena)
15{
16 // turn weapon arena off
17 M_ARGV(0, string) = "off";
18}
19
20MUTATOR_HOOKFUNCTION(melee_only, ForbidRandomStartWeapons)
21{
22 return true;
23}
24
25MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
26{
27 return true;
28}
29
30MUTATOR_HOOKFUNCTION(melee_only, FilterItemDefinition)
31{
32 entity definition = M_ARGV(0, entity);
33
34 switch (definition)
35 {
36 case ITEM_HealthSmall:
37 case ITEM_ArmorSmall:
38 return false;
39 }
40
41 return true;
42}
43
44MUTATOR_HOOKFUNCTION(melee_only, BuildMutatorsString)
45{
46 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":MeleeOnly");
47}
48
49MUTATOR_HOOKFUNCTION(melee_only, BuildMutatorsPrettyString)
50{
51 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Melee only Arena");
52}
#define MUTATOR_IS_ENABLED(this)
Definition base.qh:193
#define REGISTER_MUTATOR(...)
Definition base.qh:295
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
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]?
Definition cvar.qh:48
Gametype MapInfo_LoadedGametype
Definition mapinfo.qh:220
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
string autocvar_g_melee_only
#define WEPSET(id)
Definition all.qh:45
WepSet start_weapons
Definition world.qh:80
float start_ammo_shells
Definition world.qh:84
float warmup_start_ammo_shells
Definition world.qh:102
WepSet warmup_start_weapons
Definition world.qh:98