Bug fixed: inventory wasn't refreshed when loading a savegame if character was not switched. To make things clearer, character are now forced to reload all of their data on switch/load.

svn-id: r26190
This commit is contained in:
Nicola Mettifogo 2007-03-18 08:29:45 +00:00
parent 5ffd410e30
commit 8240027712
2 changed files with 7 additions and 2 deletions

View File

@ -793,8 +793,9 @@ void Parallaction::changeCharacter(const char *name) {
if (scumm_stricmp(v32, _characterName1)) {
if (scumm_stricmp(_characterName1, "null"))
freeCharacter();
// freeCharacter takes responsibility for checking
// character for sanity before memory is freed
freeCharacter();
_disk->selectArchive("disk1");

View File

@ -134,6 +134,10 @@ void Parallaction::doLoadGame(uint16 slot) {
parseLocation("common");
// force reload of character to solve inventory
// bugs, but it's a good maneuver anyway
strcpy(_characterName1, "null");
strcat(_vm->_location._name, _vm->_characterName);
_engineFlags |= kEngineChangeLocation;