diff options
Diffstat (limited to 'engines/toon/character.cpp')
-rw-r--r-- | engines/toon/character.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 06c6e21d21..7d9a31c170 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -596,7 +596,8 @@ int32 Character::getId() { void Character::save(Common::WriteStream *stream) { debugC(1, kDebugCharacter, "save(stream)"); - stream->writeSint32LE(_flags); + // we have to save visibility too, put in flags to not invalidate old savegames. + stream->writeSint32LE(_flags | ((_visible == false) ? 0x100 : 0)); stream->writeSint32LE(_x); stream->writeSint32LE(_y); stream->writeSint32LE(_z); @@ -633,6 +634,12 @@ void Character::load(Common::ReadStream *stream) { if (_sceneAnimationId > -1) { setAnimationInstance(_vm->getSceneAnimation(_sceneAnimationId)->_animInstance); } + + // "not visible" flag. + if (_flags & 0x100) { + _flags &= ~0x100; + setVisible(false); + } } void Character::setAnimScript(int32 animScriptId) { @@ -1102,4 +1109,3 @@ void Character::updateIdle() { } } } // End of namespace Toon - |