From 21c308e79cf7597402d5bdb4ee75b29b31689027 Mon Sep 17 00:00:00 2001 From: avirox Date: Fri, 27 Feb 2009 04:29:57 +0000 Subject: [PATCH] - 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 git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5998 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/func_breakable.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/func_breakable.qc b/data/qcsrc/server/func_breakable.qc index b996f8a4c..aceb7a4fd 100644 --- a/data/qcsrc/server/func_breakable.qc +++ b/data/qcsrc/server/func_breakable.qc @@ -67,12 +67,17 @@ void func_breakable_colormod() 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; -- 2.39.2