diff options
author | Travis Howell | 2006-06-24 01:46:54 +0000 |
---|---|---|
committer | Travis Howell | 2006-06-24 01:46:54 +0000 |
commit | 4b26f8319e6697b15b41614f51cd11d70393c9dc (patch) | |
tree | d793c264a0f80cfaffc852fef5a5a8ebc6c01b5d /engines/scumm | |
parent | 99ddd2660958b6cc3f7f1de5b2fff6f667ecd98a (diff) | |
download | scummvm-rg350-4b26f8319e6697b15b41614f51cd11d70393c9dc.tar.gz scummvm-rg350-4b26f8319e6697b15b41614f51cd11d70393c9dc.tar.bz2 scummvm-rg350-4b26f8319e6697b15b41614f51cd11d70393c9dc.zip |
Add cyx's patch for bug #1508935 - FOA: Indy walks on the spot. Also fixes car failing to turn during smart star challenge in thinker1
svn-id: r23271
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/actor.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 4cd9f565f0..7964d0b6cc 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -420,6 +420,11 @@ int Actor::actorWalkStep() { } _pos = _actorPos; + + if (_pos == _walkdata.next) { + _moving &= ~MF_IN_LEG; + return 0; + } return 1; } @@ -776,14 +781,15 @@ void Actor::turnToDirection(int newdir) { if (newdir == -1 || _ignoreTurns) return; - _moving &= ~MF_TURN; - - if (newdir != _facing) { - if (_vm->_game.version <= 6) - _moving = MF_TURN; - else - _moving |= MF_TURN; + if (_vm->_game.version <= 6) { + _moving = MF_TURN; _targetFacing = newdir; + } else { + _moving &= ~MF_TURN; + if (newdir != _facing) { + _moving |= MF_TURN; + _targetFacing = newdir; + } } } @@ -817,7 +823,7 @@ void Actor::showActor() { startAnimActor(_talkStopFrame); } else { if (_costumeNeedsInit) { - startAnimActor(_initFrame); + startAnimActor(_initFrame); _costumeNeedsInit = false; } } @@ -1335,7 +1341,7 @@ int ScummEngine_v70he::getActorFromPos(int x, int y) { for (i = 1; i < _numActors; i++) { if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable) && y >= _actors[i]._top && y <= _actors[i]._bottom - && (_actors[i]._pos.y > _actors[curActor]._pos.y || curActor == 0)) + && (_actors[i]._pos.y > _actors[curActor]._pos.y || curActor == 0)) curActor = i; } @@ -1596,7 +1602,7 @@ void Actor::startWalkActor(int destX, int destY, int dir) { if (!isInCurrentRoom() && _vm->_game.version <= 6) { _pos.x = abr.x; _pos.y = abr.y; - if (_ignoreTurns == false && dir != -1) + if (!_ignoreTurns && dir != -1) _facing = dir; return; } @@ -1688,6 +1694,12 @@ void Actor::walkActor() { _moving = 0; setBox(_walkdata.destbox); startWalkAnim(3, _walkdata.destdir); + if (_vm->_game.version <= 6) { + if (!_ignoreTurns && _walkdata.destdir != -1 && _targetFacing != _walkdata.destdir) { + _targetFacing = _walkdata.destdir; + _moving = MF_TURN; + } + } return; } |