r3285 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jan 26 10:34:28 EST 2008


Author: lordhavoc
Date: 2008-01-26 10:34:27 -0500 (Sat, 26 Jan 2008)
New Revision: 3285

Modified:
   trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
fix bug in div0's fix for weird shotgun behavior when up against a wall
- his fix caused all shots to be fired from 1 unit back, even if not
  blocked by a wall


Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-01-26 12:25:01 UTC (rev 3284)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc	2008-01-26 15:34:27 UTC (rev 3285)
@@ -37,7 +37,9 @@
 		w_shotorg = ent.origin + ent.view_ofs + v_right * vecs_y + v_up * vecs_z;
 	// now move the shotorg forward as much as requested if possible
 	traceline_hitcorpse(self, w_shotorg, w_shotorg + v_forward * (vecs_x + nudge), MOVE_NORMAL, self);
-	w_shotorg = trace_endpos - v_forward * nudge;
+	w_shotorg = trace_endpos;
+	if (trace_fraction < 1)
+		w_shotorg = w_shotorg - v_forward * nudge;
 	// calculate the shotdir from the chosen shotorg
 	w_shotdir = normalize(trueaimpoint - w_shotorg);
 




More information about the nexuiz-commits mailing list