r2343 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Apr 18 13:41:45 EDT 2007


Author: div0
Date: 2007-04-18 13:41:45 -0400 (Wed, 18 Apr 2007)
New Revision: 2343

Modified:
   trunk/data/qcsrc/server/bots.qc
   trunk/data/qcsrc/server/miscfunctions.qc
Log:
also drop waypoints to floor; no hard errors for broken waypoints any more


Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc	2007-04-18 17:33:15 UTC (rev 2342)
+++ trunk/data/qcsrc/server/bots.qc	2007-04-18 17:41:45 UTC (rev 2343)
@@ -569,7 +569,7 @@
 // (suitable for waypoint editor)
 entity(vector m1, vector m2, float f) waypoint_spawn =
 {
-	local entity w;
+	local entity w, oldself;
 	local vector org;
 	org = (m1 + m2) * 0.5;
 	m1 = m1 - org;
@@ -588,6 +588,10 @@
 	setorigin(w, org);
 	setsize(w, PL_MIN + m1, PL_MAX + m2);
 	move_out_of_solid(w);
+	oldself = self;
+	self = w;
+	droptofloor();
+	self = oldself;
 	setsize(w, m1, m2);
 
 	waypoint_clearlinks(w);

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2007-04-18 17:33:15 UTC (rev 2342)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2007-04-18 17:41:45 UTC (rev 2343)
@@ -3,7 +3,7 @@
 	float eps = 0.0625;
 	tracebox(e.origin, e.mins - '1 1 1' * eps, e.maxs + '1 1 1' * eps, e.origin + by, MOVE_WORLDONLY, e);
 	if(trace_startsolid)
-		error("could not get out of solid");
+		return;
 	if(trace_fraction < 1)
 	{
 		// hit something
@@ -21,7 +21,7 @@
 	traceline(o, o, MOVE_WORLDONLY, e);
 	if(trace_startsolid)
 	{
-		print("origin is in solid too!");
+		dprint("origin is in solid too! (", vtos(o), ")");
 		return;
 	}
 
@@ -43,7 +43,10 @@
 
 	tracebox(e.origin, e.mins, e.maxs, e.origin, MOVE_WORLDONLY, e);
 	if(trace_startsolid)
-		error("could not get out of solid");
+	{
+		dprint("could not get out of solid (", vtos(o), ")");
+		return;
+	}
 }
 
 // converts a number to a string with the indicated number of decimals




More information about the nexuiz-commits mailing list