r4401 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Sep 7 11:42:32 EDT 2008


Author: div0
Date: 2008-09-07 11:42:32 -0400 (Sun, 07 Sep 2008)
New Revision: 4401

Modified:
   trunk/data/qcsrc/server/w_porto.qc
Log:
add debug code


Modified: trunk/data/qcsrc/server/w_porto.qc
===================================================================
--- trunk/data/qcsrc/server/w_porto.qc	2008-09-07 13:52:45 UTC (rev 4400)
+++ trunk/data/qcsrc/server/w_porto.qc	2008-09-07 15:42:32 UTC (rev 4401)
@@ -6,6 +6,12 @@
 
 void W_Porto_Success (void)
 {
+	if(self.owner == world)
+	{
+		objerror("Cannot succeed successfully: no owner\n");
+		return;
+	}
+
 	self.owner.porto_current = world;
 	remove(self);
 }
@@ -13,6 +19,12 @@
 float W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo);
 void W_Porto_Fail (float failhard)
 {
+	if(self.owner == world)
+	{
+		objerror("Cannot fail successfully: no owner\n");
+		return;
+	}
+
 	// no portals here!
 	Portal_ClearWithID(self.owner, self.portal_id);
 	self.owner.porto_current = world;




More information about the nexuiz-commits mailing list