From 110d89a2c8a870e2efff62d87f135b4a6f2f0799 Mon Sep 17 00:00:00 2001 From: mrbougo Date: Fri, 1 May 2009 13:33:50 +0000 Subject: [PATCH] prevent non-players from stealing, and add 'same team' voice messages on teamstealing git-svn-id: svn://svn.icculus.org/nexuiz/trunk@6631 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/nexball.qc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/nexball.qc b/data/qcsrc/server/nexball.qc index 5f605d183..1cf9a3f25 100644 --- a/data/qcsrc/server/nexball.qc +++ b/data/qcsrc/server/nexball.qc @@ -525,7 +525,7 @@ void W_Nexball_Touch (void) PROJECTILE_TOUCH; if(attacker.team != other.team || g_nexball_basketball_teamsteal) - if((ball = other.ballcarried)) + if((ball = other.ballcarried) && (attacker.classname == "player" || attacker.classname == "gib")) { other.velocity = other.velocity + normalize(self.velocity) * other.damageforcescale * cvar("g_balance_nexball_secondary_force"); other.flags &~= FL_ONGROUND; @@ -558,6 +558,13 @@ void W_Nexball_Touch (void) LogNB("stole", attacker); sound (other, CHAN_AUTO, ball.noise2, VOL_BASE, ATTN_NORM); + + if(attacker.team == other.team && time > attacker.teamkill_complain) + { + attacker.teamkill_complain = time + 5; + attacker.teamkill_soundtime = time + 0.4; + attacker.teamkill_soundsource = other; + } } } remove(self); -- 2.39.2