Browse Source

flattenShip kills effects now

Zachary Pavlov 19 years ago
parent
commit
e438f27d76
1 changed files with 7 additions and 1 deletions
  1. 7 1
      direct/src/showbase/PythonUtil.py

+ 7 - 1
direct/src/showbase/PythonUtil.py

@@ -2453,7 +2453,13 @@ def superFlattenShip(ship):
     #PHASE 3: stop rocking task
     #PHASE 3: stop rocking task
     taskMgr.remove("shipRocking-%d"%(ship.getDoId()))
     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()
     return ship.flattenStrong()
 
 
 def exceptionLogged(f):
 def exceptionLogged(f):