r4408 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Sep 8 03:09:31 EDT 2008


Author: div0
Date: 2008-09-08 03:09:31 -0400 (Mon, 08 Sep 2008)
New Revision: 4408

Modified:
   trunk/data/qcsrc/server/portals.qc
   trunk/data/qcsrc/server/w_porto.qc
Log:
fix portal vanishing


Modified: trunk/data/qcsrc/server/portals.qc
===================================================================
--- trunk/data/qcsrc/server/portals.qc	2008-09-08 05:52:16 UTC (rev 4407)
+++ trunk/data/qcsrc/server/portals.qc	2008-09-08 07:09:31 UTC (rev 4408)
@@ -398,7 +398,7 @@
 		portal.owner.portal_in = world;
 	if(portal == portal.owner.portal_out)
 		portal.owner.portal_out = world;
-	portal.owner = world;
+	//portal.owner = world;
 
 	// makes the portal vanish
 	if(killed)

Modified: trunk/data/qcsrc/server/w_porto.qc
===================================================================
--- trunk/data/qcsrc/server/w_porto.qc	2008-09-08 05:52:16 UTC (rev 4407)
+++ trunk/data/qcsrc/server/w_porto.qc	2008-09-08 07:09:31 UTC (rev 4408)
@@ -31,7 +31,6 @@
 
 	if(!failhard && !(self.owner.weapons & WEPBIT_PORTO))
 	{
-		centerprint(self.owner, "^1Portal deployment failed.\n\n^2Catch it to try again!");
 		setsize (self, '-16 -16 0', '16 16 32');
 		setorigin(self, self.origin + trace_plane_normal);
 		if(move_out_of_solid(self))
@@ -39,14 +38,12 @@
 			self.flags = FL_ITEM;
 			self.velocity = trigger_push_calculatevelocity(self.origin, self.owner, 128);
 			tracetoss(self, self);
-			if(vlen(trace_endpos - self.owner.origin) > 128)
-				self.velocity = '0 0 0';
-			W_ThrowNewWeapon(self.owner, WEP_PORTO, 0, self.origin, self.velocity);
+			if(vlen(trace_endpos - self.owner.origin) < 128)
+			{
+				W_ThrowNewWeapon(self.owner, WEP_PORTO, 0, self.origin, self.velocity);
+				centerprint(self.owner, "^1Portal deployment failed.\n\n^2Catch it to try again!");
+			}
 		}
-		else
-		{
-			W_ThrowNewWeapon(self.owner, WEP_PORTO, 0, self.origin, '0 0 0');
-		}
 	}
 	remove(self);
 }




More information about the nexuiz-commits mailing list