[Scummvm-cvs-logs] SF.net SVN: scummvm:[39739] scummvm/trunk/engines/parallaction/ parallaction_br.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Mar 29 15:17:34 CEST 2009
Revision: 39739
http://scummvm.svn.sourceforge.net/scummvm/?rev=39739&view=rev
Author: peres001
Date: 2009-03-29 13:17:34 +0000 (Sun, 29 Mar 2009)
Log Message:
-----------
Ensure zone and animation flags are restored when a location is reloaded. This should definitely fix bug #2718462.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/parallaction_br.cpp
Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp 2009-03-29 12:41:00 UTC (rev 39738)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp 2009-03-29 13:17:34 UTC (rev 39739)
@@ -344,14 +344,26 @@
_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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list