From: Mario Date: Mon, 7 Nov 2016 12:47:27 +0000 (+1000) Subject: Turn off standard weaponarena in weapon arena modes (overkill, melee only, instagib) X-Git-Tag: xonotic-v0.8.2~460 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ba3856f207a0c77bb745715efe2b0de0257b320;p=xonotic%2Fxonotic-data.pk3dir.git Turn off standard weaponarena in weapon arena modes (overkill, melee only, instagib) --- diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index 6135e72b5..4c6dc15a3 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -360,6 +360,12 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems) start_items |= IT_UNLIMITED_SUPERWEAPONS; } +MUTATOR_HOOKFUNCTION(mutator_instagib, SetWeaponArena) +{ + // turn weapon arena off + M_ARGV(0, string) = "off"; +} + void replace_with_insta_cells(entity item) { entity e = spawn(); diff --git a/qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc b/qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc index a83474998..5bd896ea2 100644 --- a/qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc +++ b/qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc @@ -8,6 +8,12 @@ MUTATOR_HOOKFUNCTION(melee_only, SetStartItems, CBC_ORDER_LAST) start_weapons = warmup_start_weapons = WEPSET(SHOTGUN); } +MUTATOR_HOOKFUNCTION(melee_only, SetWeaponArena) +{ + // turn weapon arena off + M_ARGV(0, string) = "off"; +} + MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon) { return true; diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index d47da6c3c..21a191a0e 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -341,6 +341,12 @@ MUTATOR_HOOKFUNCTION(ok, SetStartItems, CBC_ORDER_LAST) start_weapons = warmup_start_weapons = ok_start_items; } +MUTATOR_HOOKFUNCTION(ok, SetWeaponArena) +{ + // turn weapon arena off + M_ARGV(0, string) = "off"; +} + MUTATOR_HOOKFUNCTION(ok, BuildMutatorsString) { M_ARGV(0, string) = strcat(M_ARGV(0, string), ":OK");