Преглед изворни кода

Always make sure player echo is on when menu exits.

Steve Thielemann пре 5 година
родитељ
комит
f187acf2ed
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      flexible.py

+ 3 - 0
flexible.py

@@ -2834,6 +2834,7 @@ class ProxyMenu(object):
 
 
         # If we want it, it's here.
         # If we want it, it's here.
         self.defer = None
         self.defer = None
+        self.game.to_player = True
 
 
         self.keepalive = task.LoopingCall(self.awake)
         self.keepalive = task.LoopingCall(self.awake)
         self.keepalive.start(30)
         self.keepalive.start(30)
@@ -2841,6 +2842,8 @@ class ProxyMenu(object):
 
 
     def __del__(self):
     def __del__(self):
         log.debug("ProxyMenu {0} RIP".format(self))
         log.debug("ProxyMenu {0} RIP".format(self))
+        # When we exit, always make sure player echo is on.
+        self.game.to_player = True
 
 
     def whenDone(self):
     def whenDone(self):
         self.defer = defer.Deferred()
         self.defer = defer.Deferred()