Skip to content

Commit

Permalink
PRINCE: Inventory after swaping and loading fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Aug 4, 2014
1 parent 2bed872 commit d100597
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions engines/prince/prince.cpp
Expand Up @@ -1895,9 +1895,11 @@ void PrinceEngine::swapInv(int heroId) {
for (uint i = 0; i < hero->_inventory.size(); i++) {
tempInv.push_back(hero->_inventory[i]);
}
hero->_inventory.clear();
for (uint i = 0; i < hero->_inventory2.size(); i++) {
hero->_inventory.push_back(hero->_inventory2[i]);
}
hero->_inventory2.clear();
for (uint i = 0; i < tempInv.size(); i++) {
hero->_inventory2.push_back(tempInv[i]);
}
Expand Down
4 changes: 2 additions & 2 deletions engines/prince/saveload.cpp
Expand Up @@ -420,7 +420,7 @@ void PrinceEngine::syncGame(Common::SeekableReadStream *readStream, Common::Writ
if (invId == endInv) {
break;
}
_mainHero->_inventory.push_back(invId);
_mainHero->_inventory2.push_back(invId);
}

// Second hero
Expand Down Expand Up @@ -450,7 +450,7 @@ void PrinceEngine::syncGame(Common::SeekableReadStream *readStream, Common::Writ
if (invId == endInv) {
break;
}
_secondHero->_inventory.push_back(invId);
_secondHero->_inventory2.push_back(invId);
}

// Script
Expand Down

0 comments on commit d100597

Please sign in to comment.