MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / onRemove

Method onRemove

Engine/source/environment/waterObject.cpp:897–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

895}
896
897void WaterObject::onRemove()
898{
899 Con::NotifyDelegate clbk( this, &WaterObject::_onEnableTrueReflections );
900 Con::removeVariableNotify( "$pref::Water::EnableTrueReflections", clbk );
901
902 if ( isClientObject() )
903 {
904 mPlaneReflector.unregisterReflector();
905 cleanupMaterials();
906
907 PostEffect *underWaterEffect = getUnderwaterEffect( );
908 if( underWaterEffect )
909 underWaterEffect->disable( );
910 }
911
912 Parent::onRemove();
913}
914
915void WaterObject::_onEnableTrueReflections()
916{

Callers

nothing calls this directly

Calls 3

removeVariableNotifyFunction · 0.85
unregisterReflectorMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected