From: Lyberta Date: Sat, 25 Mar 2017 09:31:11 +0000 (+0300) Subject: Survival: Defenders no longer can throw weapons. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=686f449549d262c9ce755baa269f4da5406561c3;p=xonotic%2Fxonotic-data.pk3dir.git Survival: Defenders no longer can throw weapons. --- 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) {