From: Mario Date: Fri, 24 Jun 2016 07:23:20 +0000 (+1000) Subject: Prevent picking up weapons when carrying the ball in nexball X-Git-Tag: xonotic-v0.8.2~700^2~132 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d3b78dee5e9d9b5fdfc426ac5c2615a5fca4682a;p=xonotic%2Fxonotic-data.pk3dir.git Prevent picking up weapons when carrying the ball in nexball --- 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";