Skip to content
Permalink
Browse files

KYRA: (MR) - fix animation glitch (bug #11312)

(negative character facing value causing undefined behavior)
  • Loading branch information
athrxx committed Jan 14, 2020
1 parent 990a3b0 commit 4277a293e1c897b9abf239fbd6082c54c397dafb
Showing with 9 additions and 2 deletions.
  1. +9 −2 engines/kyra/engine/scene_mr.cpp
@@ -444,8 +444,15 @@ void KyraEngine_MR::initSceneAnims(int unk1) {

AnimObj *obj = &_animObjects[0];

if (_mainCharacter.animFrame != 87 && !unk1)
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
if (_mainCharacter.animFrame != 87 && !unk1) {
if (_mainCharacter.facing == 0xFF) {
// Fix for bug #11312 (café scene)
debugC(3, kDebugLevelSprites, "KyraEngine_MR::initSceneAnims(): Triggered WORKAROUND for invalid character facing");
_mainCharacter.animFrame = 0;
} else {
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
}
}

obj->enabled = true;
obj->xPos1 = _mainCharacter.x1;

0 comments on commit 4277a29

Please sign in to comment.
You can’t perform that action at this time.