diff options
author | Filippos Karapetis | 2011-09-23 17:41:30 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-09-23 17:42:14 +0300 |
commit | 077acc5575a1918850e38df06d72579583f55053 (patch) | |
tree | 5d90d3936ab2f1bc9451ab2a1554b9b0d3683bde /engines/sci/sound | |
parent | 3eeef5cc8ea007b9b40c4ceb01ce88830286201c (diff) | |
download | scummvm-rg350-077acc5575a1918850e38df06d72579583f55053.tar.gz scummvm-rg350-077acc5575a1918850e38df06d72579583f55053.tar.bz2 scummvm-rg350-077acc5575a1918850e38df06d72579583f55053.zip |
SCI: Fixed bug #3413301 - "SCI: KQ6CD: Game stops responding at the bookworm"
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index d4cff7614c..e73df69375 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -130,8 +130,14 @@ reg_t SoundCommandParser::kDoSoundPlay(int argc, reg_t *argv, reg_t acc) { void SoundCommandParser::processPlaySound(reg_t obj) { MusicEntry *musicSlot = _music->getSlot(obj); if (!musicSlot) { - warning("kDoSound(play): Slot not found (%04x:%04x)", PRINT_REG(obj)); - return; + warning("kDoSound(play): Slot not found (%04x:%04x), initializing it manually", PRINT_REG(obj)); + // The sound hasn't been initialized for some reason, so initialize it here. + // Happens in KQ6, room 460, when giving the creature to the bookwork (the + // bookworm's child). Fixes bug #3413301. + processInitSound(obj); + musicSlot = _music->getSlot(obj); + if (!musicSlot) + error("Failed to initialize uninitialized sound slot"); } int resourceId = getSoundResourceId(obj); |