r5295 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Dec 24 09:00:05 EST 2008


Author: div0
Date: 2008-12-24 09:00:02 -0500 (Wed, 24 Dec 2008)
New Revision: 5295

Modified:
   trunk/data/qcsrc/server/w_common.qc
Log:
remove debug output


Modified: trunk/data/qcsrc/server/w_common.qc
===================================================================
--- trunk/data/qcsrc/server/w_common.qc	2008-12-24 13:57:07 UTC (rev 5294)
+++ trunk/data/qcsrc/server/w_common.qc	2008-12-24 14:00:02 UTC (rev 5295)
@@ -202,9 +202,9 @@
 	E0_m = 0.5 * v0 * v0;
 	maxdist = E0_m / constant;
 	// maxdist = 0.5 * v0 * v0 / constant
-	dprint("max dist = ", ftos(maxdist), "\n");
+	// dprint("max dist = ", ftos(maxdist), "\n");
 
-	if(maxdist <= 0)
+	if(maxdist <= 0.5)
 		return 0;
 
 	tracevel = normalize(vel);
@@ -253,12 +253,9 @@
 	dst = vlen(self.W_BallisticBullet_LeaveSolid_origin - org);
 	// E(s) = E0 - constant * s, constant = area of bullet circle * material constant / mass
 	Es_m = E0_m - constant * dst;
-	if(Es_m < 0)
+	if(Es_m <= 0)
 	{
-		print("ballistics: error condition Es_m < 0\n");
-		print("dst = ", ftos(dst), "\n");
-		print("maxdist = ", ftos(maxdist), "\n");
-		Es_m = 0;
+		// roundoff errors got us
 		return 0;
 	}
 	vs = sqrt(2 * Es_m);
@@ -267,6 +264,7 @@
 	dt = dst / (0.5 * (v0 + vs));
 	// this is not correct, but the differential equations have no analytic
 	// solution - and these times are very small anyway
+	//print("dt = ", ftos(dt), "\n");
 
 	self.W_BallisticBullet_LeaveSolid_think_save = self.think;
 	self.W_BallisticBullet_LeaveSolid_nextthink_save = self.nextthink;




More information about the nexuiz-commits mailing list