Send a message when music has been enabled so that the game can appropriately choose what music to play

This commit is contained in:
Abhishek Nath 2009-12-22 03:10:40 +00:00
parent 3627e9ff2c
commit f859cf502d

View File

@ -1495,6 +1495,9 @@ class ShowBase(DirectObject.DirectObject):
self.musicManager.setActive(bEnableMusic) self.musicManager.setActive(bEnableMusic)
self.musicActive = bEnableMusic self.musicActive = bEnableMusic
if bEnableMusic: if bEnableMusic:
# This is useful when we want to play different music
# from what the manager has queued
messenger.send("MusicEnabled")
self.notify.debug("Enabling music") self.notify.debug("Enabling music")
else: else:
self.notify.debug("Disabling music") self.notify.debug("Disabling music")