diff options
author | Nicola Mettifogo | 2007-10-21 15:26:07 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-10-21 15:26:07 +0000 |
commit | 03d5111a74c7ab92c07b469ca6945544265fea12 (patch) | |
tree | 4ab6e126707e83e4522e285351ef6fe801c76407 /engines/parallaction | |
parent | c68871860ab58ebb8cdb5f31615a39caa79c1c6f (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 5 | ||||
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 3 |
2 files changed, 7 insertions, 1 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"); } diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index b8b6cf338c..3ce7ce881a 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -988,8 +988,9 @@ void Parallaction_ns::parseLocation(const char *filename) { // this loads animation scripts AnimationList::iterator it = _animations.begin(); for ( ; it != _animations.end(); it++) { - if ((*it)->_scriptName) + if (((*it)->_scriptName) && ((*it)->_program == 0)) { loadProgram(*it, (*it)->_scriptName); + } } debugC(1, kDebugParser, "parseLocation('%s') done", filename); |