From 100b8098360862fc00885d3de9a2ad24ae3c9d20 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 24 Jul 2006 10:52:14 +0000 Subject: Fix bug #1527630 - ZAK FM-TOWNS: Actor (Caponian) picks wrong line svn-id: r23586 --- engines/scumm/actor.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 74afcfdbbc..c08d47e076 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1639,7 +1639,8 @@ void Actor::startWalkActor(int destX, int destY, int dir) { } if (_pos.x == abr.x && _pos.y == abr.y) { - turnToDirection(dir); + if (dir != _facing) + turnToDirection(dir); return; } @@ -1713,10 +1714,8 @@ void Actor::walkActor() { setBox(_walkdata.destbox); if (_vm->_game.version <= 6) { startAnimActor(_standFrame); - if (!_ignoreTurns && _walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { - _targetFacing = _walkdata.destdir; - _moving = MF_TURN; - } + if (_targetFacing != _walkdata.destdir) + turnToDirection(_walkdata.destdir); } else { startWalkAnim(3, _walkdata.destdir); } @@ -1793,10 +1792,8 @@ void Actor::walkActorV12() { if (_moving & MF_LAST_LEG) { _moving = 0; startAnimActor(_standFrame); - if (_walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { - _targetFacing = _walkdata.destdir; - _moving = MF_TURN; - } + if (_targetFacing != _walkdata.destdir) + turnToDirection(_walkdata.destdir); } else { setBox(_walkdata.curbox); if (_walkbox == _walkdata.destbox) { @@ -1840,10 +1837,8 @@ void Actor::walkActorOld() { if (_moving & MF_LAST_LEG) { _moving = 0; startAnimActor(_standFrame); - if (_walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { - _targetFacing = _walkdata.destdir; - _moving = MF_TURN; - } + if (_targetFacing != _walkdata.destdir) + turnToDirection(_walkdata.destdir); return; } -- cgit v1.2.3