mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-24 18:56:33 +00:00
Fix for some cases where the protagonist from some savegames in IHNM was not loaded correctly
svn-id: r28596
This commit is contained in:
parent
985ac6ceaa
commit
d5b7a57536
@ -305,11 +305,14 @@ void SagaEngine::load(const char *fileName) {
|
|||||||
if (getGameType() != GType_ITE) {
|
if (getGameType() != GType_ITE) {
|
||||||
if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
|
if (_scene->currentProtag() != 0 && _scene->currentChapterNumber() != 6) {
|
||||||
ActorData *actor1 = _actor->getFirstActor();
|
ActorData *actor1 = _actor->getFirstActor();
|
||||||
// Original stores the current protagonist ID from sfSwapActors:
|
ActorData *actor2;
|
||||||
//ActorData *actor2 = _actor->getActor(_scene->currentProtag());
|
// The original gets actor2 from the current protagonist ID, but this is sometimes wrong
|
||||||
// However, we already store the protagonist, so merely getting the saved
|
// If the current protagonist ID is not correct, use the stored protagonist
|
||||||
// protagonist is easier and safer, and works without glitches
|
if (!_actor->validActorId(_scene->currentProtag())) {
|
||||||
ActorData *actor2 = _actor->_protagonist;
|
actor2 = _actor->_protagonist;
|
||||||
|
} else {
|
||||||
|
actor2 = _actor->getActor(_scene->currentProtag());
|
||||||
|
}
|
||||||
|
|
||||||
SWAP(actor1->_location, actor2->_location);
|
SWAP(actor1->_location, actor2->_location);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user