From d3b78dee5e9d9b5fdfc426ac5c2615a5fca4682a Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 24 Jun 2016 17:23:20 +1000 Subject: [PATCH] Prevent picking up weapons when carrying the ball in nexball --- qcsrc/common/gamemodes/gamemode/nexball/nexball.qc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 46b4e0345..291f201c4 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -1073,6 +1073,17 @@ MUTATOR_HOOKFUNCTION(nb, FilterItem) return false; } +MUTATOR_HOOKFUNCTION(nb, ItemTouch) +{ + entity item = M_ARGV(0, entity); + entity toucher = M_ARGV(1, entity); + + if(item.weapon && toucher.ballcarried) + return MUT_ITEMTOUCH_RETURN; // no new weapons for you, mister! + + return MUT_ITEMTOUCH_CONTINUE; +} + MUTATOR_HOOKFUNCTION(nb, GetTeamCount) { M_ARGV(1, string) = "nexball_team"; -- 2.39.2