Explorar o código

Fix persistent underwater effect.

LuisAntonRebollo %!s(int64=11) %!d(string=hai) anos
pai
achega
7453610563
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Engine/source/environment/waterObject.cpp

+ 4 - 0
Engine/source/environment/waterObject.cpp

@@ -891,6 +891,10 @@ void WaterObject::onRemove()
    {
       mPlaneReflector.unregisterReflector();
       cleanupMaterials();
+
+      PostEffect *underWaterEffect = getUnderwaterEffect( );
+      if( underWaterEffect )
+         underWaterEffect->disable( );
    }
 
    Parent::onRemove();