aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/player_towns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/player_towns.cpp')
-rw-r--r--engines/scumm/player_towns.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index f6f493a1e1..2588026e59 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -75,10 +75,19 @@ void Player_Towns::saveLoadWithSerializer(Serializer *ser) {
}
void Player_Towns::restoreAfterLoad() {
+ Common::Array<uint16> restoredSounds;
+
for (int i = 1; i < 9; i++) {
if (!_pcmCurrentSound[i].index || _pcmCurrentSound[i].index == 0xffff)
continue;
+ // Don't restart multichannel sounds more than once
+ if (Common::find(restoredSounds.begin(), restoredSounds.end(), _pcmCurrentSound[i].index) != restoredSounds.end())
+ continue;
+
+ if (!_v2)
+ restoredSounds.push_back(_pcmCurrentSound[i].index);
+
uint8 *ptr = _vm->getResourceAddress(rtSound, _pcmCurrentSound[i].index);
if (!ptr)
continue;