r1845 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 22 17:02:58 EDT 2006


Author: div0
Date: 2006-08-22 17:02:57 -0400 (Tue, 22 Aug 2006)
New Revision: 1845

Modified:
   trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
don't do antilag if you would have hit without it (prevents misses when a player is almost completely behind an obstacle)


Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc	2006-08-22 16:29:06 UTC (rev 1844)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc	2006-08-22 21:02:57 UTC (rev 1845)
@@ -30,9 +30,10 @@
 	// if aiming at a player and the original trace won't hit that player
 	// anymore, try aiming at the player's new position
 	if (antilag)
-	if (self.cursor_trace_ent)
-	if (self.cursor_trace_ent.takedamage)
-	if (trace_ent != self.cursor_trace_ent)
+	if (!trace_ent.takedamage)                 // shot would miss without antilag
+	if (self.cursor_trace_ent)                 // but it HAD hit on the client
+	if (self.cursor_trace_ent.takedamage)      //   and even something evil
+	// if (trace_ent != self.cursor_trace_ent) // and it is different (redundant check, see takedamage)
 	if (cvar("g_antilag"))
 		trueaimpoint = self.cursor_trace_ent.origin;
 




More information about the nexuiz-commits mailing list