[Scummvm-cvs-logs] SF.net SVN: scummvm: [28596] scummvm/trunk/engines/saga/saveload.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Aug 13 17:57:05 CEST 2007
Revision: 28596
http://scummvm.svn.sourceforge.net/scummvm/?rev=28596&view=rev
Author: thebluegr
Date: 2007-08-13 08:57:04 -0700 (Mon, 13 Aug 2007)
Log Message:
-----------
Fix for some cases where the protagonist from some savegames in IHNM was not loaded correctly
Modified Paths:
--------------
scummvm/trunk/engines/saga/saveload.cpp
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2007-08-13 15:18:44 UTC (rev 28595)
+++ scummvm/trunk/engines/saga/saveload.cpp 2007-08-13 15:57:04 UTC (rev 28596)
@@ -305,11 +305,14 @@
if (getGameType() != GType_ITE) {
if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
ActorData *actor1 = _actor->getFirstActor();
- // Original stores the current protagonist ID from sfSwapActors:
- //ActorData *actor2 = _actor->getActor(_scene->currentProtag());
- // However, we already store the protagonist, so merely getting the saved
- // protagonist is easier and safer, and works without glitches
- ActorData *actor2 = _actor->_protagonist;
+ ActorData *actor2;
+ // The original gets actor2 from the current protagonist ID, but this is sometimes wrong
+ // If the current protagonist ID is not correct, use the stored protagonist
+ if (!_actor->validActorId(_scene->currentProtag())) {
+ actor2 = _actor->_protagonist;
+ } else {
+ actor2 = _actor->getActor(_scene->currentProtag());
+ }
SWAP(actor1->_location, actor2->_location);
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