From e438f27d768ed2c2e3ddbd7cfb0be674002a364f Mon Sep 17 00:00:00 2001 From: Zachary Pavlov Date: Tue, 14 Nov 2006 22:56:49 +0000 Subject: [PATCH] flattenShip kills effects now --- direct/src/showbase/PythonUtil.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index b77ffab79a..00d4ddb4ff 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -2453,7 +2453,13 @@ def superFlattenShip(ship): #PHASE 3: stop rocking task taskMgr.remove("shipRocking-%d"%(ship.getDoId())) - #PHASE 4: flatten strong! + #PHASE 4: kill lamp effects + from pirates.shipparts.DistributedShipDecor import DistributedShipDecor + for DO in base.cr.doId2do.values(): + if(type(DO) == DistributedShipDecor): + DO.prop.lanternGlowEffect.destroy() + + #PHASE 5: flatten strong! return ship.flattenStrong() def exceptionLogged(f):