r3885 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jul 22 09:46:09 EDT 2008


Author: div0
Date: 2008-07-22 09:46:09 -0400 (Tue, 22 Jul 2008)
New Revision: 3885

Modified:
   trunk/data/qcsrc/server/g_hook.qc
Log:
add a stupid (but confirmed) skyhook workaround


Modified: trunk/data/qcsrc/server/g_hook.qc
===================================================================
--- trunk/data/qcsrc/server/g_hook.qc	2008-07-22 06:34:12 UTC (rev 3884)
+++ trunk/data/qcsrc/server/g_hook.qc	2008-07-22 13:46:09 UTC (rev 3885)
@@ -166,6 +166,24 @@
 		return;
 	}
 
+	if(other == world)
+	{
+		vector tic;
+		tic = self.velocity * sys_ticrate;
+		tic = tic + normalize(tic) * vlen(self.maxs - self.mins);
+		traceline(self.origin - tic, self.origin + tic, MOVE_NORMAL, self);
+		if(trace_fraction >= 1)
+		{
+			dprint("Odd... did not hit...?\n");
+		}
+		else if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+		{
+			dprint("Detected and prevented the sky-grapple bug.\n");
+			RemoveGrapplingHook(self.owner);
+			return;
+		}
+	}
+
 	pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
 	sound (self, CHAN_BODY, "weapons/hook_impact.wav", 1, ATTN_NORM);
 




More information about the nexuiz-commits mailing list