Browse Source

Disabled network replication from SoundSource's position and autoremove attributes.

Lasse Öörni 14 years ago
parent
commit
67c77087bc
2 changed files with 6 additions and 8 deletions
  1. 2 2
      Engine/Audio/SoundSource.cpp
  2. 4 6
      Engine/Engine/Engine.cpp

+ 2 - 2
Engine/Audio/SoundSource.cpp

@@ -139,9 +139,9 @@ void SoundSource::RegisterObject(Context* context)
     ATTRIBUTE(SoundSource, VAR_FLOAT, "Gain", gain_, 1.0f, AM_DEFAULT);
     ATTRIBUTE(SoundSource, VAR_FLOAT, "Attenuation", attenuation_, 1.0f, AM_DEFAULT);
     ATTRIBUTE(SoundSource, VAR_FLOAT, "Panning", panning_, 0.0f, AM_DEFAULT);
-    ATTRIBUTE(SoundSource, VAR_BOOL, "Autoremove on Stop", autoRemove_, false, AM_DEFAULT);
+    ATTRIBUTE(SoundSource, VAR_BOOL, "Autoremove on Stop", autoRemove_, false, AM_FILE);
     ACCESSOR_ATTRIBUTE(SoundSource, VAR_RESOURCEREF, "Sound", GetSoundAttr, SetSoundAttr, ResourceRef, ResourceRef(Sound::GetTypeStatic()), AM_DEFAULT);
-    ACCESSOR_ATTRIBUTE(SoundSource, VAR_INT, "Play Position", GetPositionAttr, SetPositionAttr, int, 0, AM_DEFAULT);
+    ACCESSOR_ATTRIBUTE(SoundSource, VAR_INT, "Play Position", GetPositionAttr, SetPositionAttr, int, 0, AM_FILE);
 }
 
 void SoundSource::Play(Sound* sound)

+ 4 - 6
Engine/Engine/Engine.cpp

@@ -240,13 +240,11 @@ void Engine::RunFrame()
     if (!initialized_ || exiting_)
         return;
     
-    if (!headless_)
+    // Set exit flag if the window was closed
+    if (!headless_ && !GetSubsystem<Graphics>()->IsInitialized())
     {
-        if (!GetSubsystem<Graphics>()->IsInitialized())
-        {
-            Exit();
-            return;
-        }
+        exiting_ = true;
+        return;
     }
     
     Time* time = GetSubsystem<Time>();