diff options
| author | Nicola Mettifogo | 2009-03-29 13:17:34 +0000 | 
|---|---|---|
| committer | Nicola Mettifogo | 2009-03-29 13:17:34 +0000 | 
| commit | 340b0e632eabec16a9ee07545bc57b9ca6f78660 (patch) | |
| tree | 91b68bed96dab545e0c244f4ddd5bfeae9cc9baf | |
| parent | 011b73a09ba1e3d51a403ed65cedcd9394d6bfb0 (diff) | |
| download | scummvm-rg350-340b0e632eabec16a9ee07545bc57b9ca6f78660.tar.gz scummvm-rg350-340b0e632eabec16a9ee07545bc57b9ca6f78660.tar.bz2 scummvm-rg350-340b0e632eabec16a9ee07545bc57b9ca6f78660.zip | |
Ensure zone and animation flags are restored when a location is reloaded. This should definitely fix bug #2718462.
svn-id: r39739
| -rw-r--r-- | engines/parallaction/parallaction_br.cpp | 20 | 
1 files changed, 16 insertions, 4 deletions
| diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 0cd89bf647..73ab2c0bb6 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -344,14 +344,26 @@ void Parallaction_br::parseLocation(const char *filename) {  	_locationParser->parse(script);  	delete script; +	bool visited = getLocationFlags() & kFlagsVisited; +  	// this loads animation scripts -	AnimationList::iterator it = _location._animations.begin(); -	for ( ; it != _location._animations.end(); ++it) { -		if ((*it)->_scriptName) { -			loadProgram(*it, (*it)->_scriptName); +	AnimationList::iterator ait = _location._animations.begin(); +	for ( ; ait != _location._animations.end(); ++ait) { +		// restore the flags if the location has already been visited +		restoreOrSaveZoneFlags(*ait, visited); + +		// load the script +		if ((*ait)->_scriptName) { +			loadProgram(*ait, (*ait)->_scriptName);  		}  	} +	ZoneList::iterator zit = _vm->_location._zones.begin(); +	for ( ; zit != _vm->_location._zones.end(); ++zit) { +		// restore the flags if the location has already been visited +		restoreOrSaveZoneFlags(*zit, visited); +	} +  	debugC(1, kDebugParser, "parseLocation('%s') done", filename);  	return;  } | 
