r4452 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Sep 12 01:33:26 EDT 2008


Author: div0
Date: 2008-09-12 01:33:24 -0400 (Fri, 12 Sep 2008)
New Revision: 4452

Modified:
   trunk/data/qcsrc/server/portals.qc
Log:
remove the debug code that now causes portals to crash


Modified: trunk/data/qcsrc/server/portals.qc
===================================================================
--- trunk/data/qcsrc/server/portals.qc	2008-09-11 18:20:30 UTC (rev 4451)
+++ trunk/data/qcsrc/server/portals.qc	2008-09-12 05:33:24 UTC (rev 4452)
@@ -1,5 +1,3 @@
-float portals_must_not_break; // debug code
-
 .vector portal_transform;
 .vector portal_safe_origin;
 .float portal_wants_to_vanish;
@@ -86,10 +84,6 @@
 	vector old_yawforward;
 	float planeshift, s, t;
 
-	if(!portals_must_not_break)
-		error("Portal_TeleportPlayer called for unprotected portals");
-	print("Portalling using ", etos(teleporter), " to ", etos(teleporter.enemy), "\n");
-
 	from = teleporter.origin;
 	transform = teleporter.portal_transform;
 
@@ -199,9 +193,6 @@
 	TeleportPlayer(teleporter, player, to, ang, newvel, teleporter.enemy.absmin, teleporter.enemy.absmax);
 
 	// reset fade counter
-	if(!portals_must_not_break)
-		error("Portal_TeleportPlayer ended with unprotected portals");
-	print("Portalled using ", etos(teleporter), " to ", etos(teleporter.enemy), "\n");
 	teleporter.portal_wants_to_vanish = 0;
 	teleporter.fade_time = time + 15;
 	teleporter.enemy.health = 300;
@@ -271,23 +262,15 @@
 		return;
 	}
 
-	print("Portal ID ", etos(self), " verified working.\n");
-	portals_must_not_break = 1;
-
 	if(Portal_TeleportPlayer(self, other))
 		if(other.classname == "porto")
 			if(other.effects & EF_RED)
 				other.effects += EF_BLUE - EF_RED;
-
-	portals_must_not_break = 0;
 }
 
 void Portal_Think();
 void Portal_MakeBrokenPortal(entity portal)
 {
-	if(portals_must_not_break)
-		error("Trying to remove a portal during teleporting");
-
 	portal.solid = SOLID_NOT;
 	portal.touch = SUB_Null;
 	portal.think = SUB_Null;
@@ -385,9 +368,6 @@
 	entity e;
 	e = portal.enemy;
 
-	if(portals_must_not_break)
-		error("Trying to remove a portal during teleporting");
-
 	if(e)
 	{
 		Portal_Disconnect(portal, e);
@@ -439,9 +419,6 @@
 	if(!self.enemy)
 		error("Portal_Think called for a broken portal\n");
 
-	//print("Portal ID ", etos(self), " verified working.\n");
-	portals_must_not_break = 1;
-
 	o = self.owner;
 	self.solid = SOLID_BBOX;
 	self.owner = world;
@@ -462,8 +439,6 @@
 	self.solid = SOLID_TRIGGER;
 	self.owner = o;
 
-	portals_must_not_break = 0;
-
 	self.nextthink = time;
 
 	if(time > self.fade_time)




More information about the nexuiz-commits mailing list