r4672 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Oct 8 11:57:37 EDT 2008


Author: div0
Date: 2008-10-08 11:57:36 -0400 (Wed, 08 Oct 2008)
New Revision: 4672

Modified:
   trunk/data/qcsrc/server/t_teleporters.qc
Log:
it currently is not allowed to objerror() when an InitializeEntity function is set!


Modified: trunk/data/qcsrc/server/t_teleporters.qc
===================================================================
--- trunk/data/qcsrc/server/t_teleporters.qc	2008-10-08 15:42:55 UTC (rev 4671)
+++ trunk/data/qcsrc/server/t_teleporters.qc	2008-10-08 15:57:36 UTC (rev 4672)
@@ -150,7 +150,6 @@
 	if (!self.enemy)
 	{
 		objerror ("Teleporter with nonexistant target");
-		remove(self);
 		return;
 	}
 
@@ -164,9 +163,12 @@
 
 	EXACTTRIGGER_INIT;
 
+	if (!self.target)
+	{
+		objerror ("Teleporter with no target");
+		return;
+	}
+
 	// this must be called to spawn the teleport waypoints for bots
 	InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
-
-	if (!self.target)
-		objerror ("Teleporter with no target");
 }




More information about the nexuiz-commits mailing list