From 3f4cc015b2d7b0ddd26a24dada04a64b68d27bc6 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 7 Jul 2006 07:31:13 +0000 Subject: Fix bug #1518523 - FOA: Indy facing the wrong direction in intro. And adjust walk code to closer match original code of earlier games svn-id: r23381 --- engines/scumm/actor.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index a69760cb1f..c61c147ed4 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -384,7 +384,12 @@ int Actor::actorWalkStep() { nextFacing = updateActorDirection(true); if (!(_moving & MF_IN_LEG) || _facing != nextFacing) { if (_walkFrame != _frame || _facing != nextFacing) { - startWalkAnim(1, nextFacing); + if (_vm->_game.version <= 6) { + startAnimActor(_walkFrame); + setDirection(nextFacing); + } else { + startWalkAnim(1, nextFacing); + } } _moving |= MF_IN_LEG; } @@ -1693,12 +1698,14 @@ void Actor::walkActor() { if (_moving & MF_LAST_LEG) { _moving = 0; setBox(_walkdata.destbox); - startWalkAnim(3, _walkdata.destdir); if (_vm->_game.version <= 6) { + startAnimActor(_standFrame); if (!_ignoreTurns && _walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { _targetFacing = _walkdata.destdir; _moving = MF_TURN; } + } else { + startWalkAnim(3, _walkdata.destdir); } return; } @@ -1772,7 +1779,11 @@ void Actor::walkActorV12() { } else { if (_moving & MF_LAST_LEG) { _moving = 0; - startWalkAnim(3, _walkdata.destdir); + startAnimActor(_standFrame); + if (_walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { + _targetFacing = _walkdata.destdir; + _moving = MF_TURN; + } } else { setBox(_walkdata.curbox); if (_walkbox == _walkdata.destbox) { @@ -1815,7 +1826,11 @@ void Actor::walkActorOld() { if (_moving & MF_LAST_LEG) { _moving = 0; - startWalkAnim(3, _walkdata.destdir); + startAnimActor(_standFrame); + if (_walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { + _targetFacing = _walkdata.destdir; + _moving = MF_TURN; + } return; } -- cgit v1.2.3