r3290 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jan 26 17:54:03 EST 2008
Author: lordhavoc
Date: 2008-01-26 17:54:02 -0500 (Sat, 26 Jan 2008)
New Revision: 3290
Modified:
trunk/data/qcsrc/server/cl_weaponsystem.qc
Log:
undo my broken fix and add a comment to explain the weird nudge handling
Modified: trunk/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-01-26 21:22:53 UTC (rev 3289)
+++ trunk/data/qcsrc/server/cl_weaponsystem.qc 2008-01-26 22:54:02 UTC (rev 3290)
@@ -24,7 +24,7 @@
// make sure you call makevectors first (FIXME?)
void(entity ent, vector vecs, float antilag, float recoil, string snd) W_SetupShot =
{
- float nudge = 1;
+ float nudge = 1; // added to traceline target and subtracted from result
local vector trueaimpoint;
traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * MAX_SHOT_DISTANCE, MOVE_NOMONSTERS, self);
trueaimpoint = trace_endpos;
@@ -37,9 +37,7 @@
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;
- if (trace_fraction < 1)
- w_shotorg = w_shotorg - v_forward * nudge;
+ w_shotorg = trace_endpos - v_forward * nudge;
// calculate the shotdir from the chosen shotorg
w_shotdir = normalize(trueaimpoint - w_shotorg);
More information about the nexuiz-commits
mailing list