From 686f449549d262c9ce755baa269f4da5406561c3 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Sat, 25 Mar 2017 12:31:11 +0300 Subject: [PATCH] Survival: Defenders no longer can throw weapons. --- qcsrc/server/mutators/mutator/gamemode_survival.qc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 39a8f4a8d..3af8de59c 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -1866,6 +1866,16 @@ MUTATOR_HOOKFUNCTION(surv, ItemTouch) return MUT_ITEMTOUCH_CONTINUE; } +/// \brief Hook which is called when the player tries to throw their weapon. +MUTATOR_HOOKFUNCTION(surv, ForbidThrowCurrentWeapon) +{ + entity player = M_ARGV(0, entity); + if (player.team == surv_defenderteam) + { + return true; + } +} + /// \brief Hook which is called when the damage amount must be determined. MUTATOR_HOOKFUNCTION(surv, Damage_Calculate) { -- 2.39.5