r5975 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Feb 25 12:19:56 EST 2009


Author: avirox
Date: 2009-02-25 12:19:53 -0500 (Wed, 25 Feb 2009)
New Revision: 5975

Modified:
   trunk/data/qcsrc/server/func_breakable.qc
Log:
- .mdl_dead would work best with an origin, but it shouldn't require one; I added a small hack to send it to the middle of the brush entity if no origin brush is present.

Modified: trunk/data/qcsrc/server/func_breakable.qc
===================================================================
--- trunk/data/qcsrc/server/func_breakable.qc	2009-02-25 17:10:45 UTC (rev 5974)
+++ trunk/data/qcsrc/server/func_breakable.qc	2009-02-25 17:19:53 UTC (rev 5975)
@@ -69,8 +69,11 @@
 {
 	if(self.mdl_dead == "")
 		self.model = "";
-	else
+	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..
+			self.origin = (self.absmax+self.absmin)*.5);
+	}
 		
 	self.solid = SOLID_NOT;
 }




More information about the nexuiz-commits mailing list