[nexuiz-commits] r6631 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri May 1 09:33:51 EDT 2009


Author: mrbougo
Date: 2009-05-01 09:33:50 -0400 (Fri, 01 May 2009)
New Revision: 6631

Modified:
   trunk/data/qcsrc/server/nexball.qc
Log:
prevent non-players from stealing, and add 'same team' voice messages on teamstealing

Modified: trunk/data/qcsrc/server/nexball.qc
===================================================================
--- trunk/data/qcsrc/server/nexball.qc	2009-05-01 12:48:46 UTC (rev 6630)
+++ trunk/data/qcsrc/server/nexball.qc	2009-05-01 13:33:50 UTC (rev 6631)
@@ -525,7 +525,7 @@
 
 	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 @@
 
 			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);



More information about the nexuiz-commits mailing list