aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction_ns.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-10-21 15:26:07 +0000
committerNicola Mettifogo2007-10-21 15:26:07 +0000
commit03d5111a74c7ab92c07b469ca6945544265fea12 (patch)
tree4ab6e126707e83e4522e285351ef6fe801c76407 /engines/parallaction/parallaction_ns.cpp
parentc68871860ab58ebb8cdb5f31615a39caa79c1c6f (diff)
downloadscummvm-rg350-03d5111a74c7ab92c07b469ca6945544265fea12.tar.gz
scummvm-rg350-03d5111a74c7ab92c07b469ca6945544265fea12.tar.bz2
scummvm-rg350-03d5111a74c7ab92c07b469ca6945544265fea12.zip
Fixed parseLocation, so that it only tries to parse scripts when they aren't already loaded. This fixes bugs like #1816899, caused by the wrong data archive being selected in the Disk object.
svn-id: r29240
Diffstat (limited to 'engines/parallaction/parallaction_ns.cpp')
-rw-r--r--engines/parallaction/parallaction_ns.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index c2c2f2b0a4..5ec5606845 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -369,6 +369,11 @@ void Parallaction_ns::changeCharacter(const char *name) {
_soundMan->playCharacterMusic(_char.getBaseName());
+ // The original engine used to reload 'common' only on loadgames. We are reloading here since 'common'
+ // contains character specific stuff. This causes crashes like bug #1816899, because parseLocation tries
+ // to reload scripts but the data archive selected is occasionally wrong. This has been solved by having
+ // parseLocation only load scripts when they aren't already loaded - which it should have done since the
+ // beginning nevertheless.
if (!(getFeatures() & GF_DEMO))
parseLocation("common");
}