From: Mario Date: Mon, 20 Jan 2014 04:14:47 +0000 (+1100) Subject: Disable weapon dropping in melee only mutator X-Git-Tag: xonotic-v0.8.0~237^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a90d13c2cf1662026ac06c803640fc8f8ff8d2b6;p=xonotic%2Fxonotic-data.pk3dir.git Disable weapon dropping in melee only mutator --- diff --git a/qcsrc/server/mutators/mutator_melee_only.qc b/qcsrc/server/mutators/mutator_melee_only.qc index 73b7dd949..c435aba03 100644 --- a/qcsrc/server/mutators/mutator_melee_only.qc +++ b/qcsrc/server/mutators/mutator_melee_only.qc @@ -1,14 +1,16 @@ MUTATOR_HOOKFUNCTION(melee_SetStartItems) { - start_ammo_shells = 0; - warmup_start_ammo_shells = 0; - - start_weapons = WEPSET_SHOTGUN; - warmup_start_weapons = WEPSET_SHOTGUN; + start_ammo_shells = warmup_start_ammo_shells = 0; + start_weapons = warmup_start_weapons = WEPSET_SHOTGUN; return FALSE; } +MUTATOR_HOOKFUNCTION(melee_ForbidThrowing) +{ + return TRUE; +} + MUTATOR_HOOKFUNCTION(melee_FilterItem) { switch (self.items) @@ -36,6 +38,7 @@ MUTATOR_HOOKFUNCTION(melee_BuildMutatorsPrettyString) MUTATOR_DEFINITION(mutator_melee_only) { MUTATOR_HOOK(SetStartItems, melee_SetStartItems, CBC_ORDER_ANY); + MUTATOR_HOOK(ForbidThrowCurrentWeapon, melee_ForbidThrowing, CBC_ORDER_ANY); MUTATOR_HOOK(FilterItem, melee_FilterItem, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsString, melee_BuildMutatorsString, CBC_ORDER_ANY); MUTATOR_HOOK(BuildMutatorsPrettyString, melee_BuildMutatorsPrettyString, CBC_ORDER_ANY);