Sfoglia il codice sorgente

Merge pull request #394 from lornemcintosh/development

Clean up SFXSources in Player class
SilentMike 12 anni fa
parent
commit
a8543a3998
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      Engine/source/T3D/player.cpp

+ 6 - 0
Engine/source/T3D/player.cpp

@@ -1763,6 +1763,12 @@ void Player::onRemove()
    setControlObject(0);
    scriptOnRemove();
    removeFromScene();
+   
+   if ( isGhost() )
+   {
+      SFX_DELETE( mMoveBubbleSound );
+      SFX_DELETE( mWaterBreathSound );
+   }
 
    U32 i;
    for( i=0; i<PlayerData::NUM_SPLASH_EMITTERS; i++ )