Răsfoiți Sursa

allow want-sound to turn off music and sfx too

David Rose 24 ani în urmă
părinte
comite
208787c6a4
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      direct/src/showbase/ShowBase.py

+ 3 - 0
direct/src/showbase/ShowBase.py

@@ -40,6 +40,9 @@ class ShowBase:
         self.wantMusic = self.config.GetBool('audio-music-active', 1)
         self.wantMusic = self.config.GetBool('audio-music-active', 1)
         if not (self.wantSfx or self.wantMusic):
         if not (self.wantSfx or self.wantMusic):
             self.wantAnySound = None
             self.wantAnySound = None
+        if not self.wantAnySound:
+            self.wantSfx = None
+            self.wantMusic = None
         self.wantDIRECT = self.config.GetBool('want-directtools', 0)
         self.wantDIRECT = self.config.GetBool('want-directtools', 0)
         self.wantStats = self.config.GetBool('want-stats', 0)
         self.wantStats = self.config.GetBool('want-stats', 0)