r5998 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Feb 26 23:29:57 EST 2009


Author: avirox
Date: 2009-02-26 23:29:57 -0500 (Thu, 26 Feb 2009)
New Revision: 5998

Modified:
   trunk/data/qcsrc/server/func_breakable.qc
Log:
- When no origin brush is present, spawn the .mdl_dead on the lowest z axis of the original brush instead of dead center

PS. mand1nga owes whoever reaches commit #6000 a beer

Modified: trunk/data/qcsrc/server/func_breakable.qc
===================================================================
--- trunk/data/qcsrc/server/func_breakable.qc	2009-02-27 02:58:37 UTC (rev 5997)
+++ trunk/data/qcsrc/server/func_breakable.qc	2009-02-27 04:29:57 UTC (rev 5998)
@@ -67,12 +67,17 @@
 
 void func_breakable_look_destroyed()
 {
+	local float floor_z;
+	
 	if(self.mdl_dead == "")
 		self.model = "";
 	else {
 		setmodel(self, self.mdl_dead);
-		if (self.origin == '0 0 0')		// probably no origin brush, so don't spawn in the middle of the map..
+		if (self.origin == '0 0 0')	{	// probably no origin brush, so don't spawn in the middle of the map..
+			floor_z = self.absmin_z;
 			self.origin = ((self.absmax+self.absmin)*.5);
+			self.origin_z = floor_z;
+		}
 	}
 		
 	self.solid = SOLID_NOT;




More information about the nexuiz-commits mailing list