diff options
author | Max Horn | 2003-09-11 23:31:46 +0000 |
---|---|---|
committer | Max Horn | 2003-09-11 23:31:46 +0000 |
commit | 7be171f910b9368dc93691886303ee9c964c0c80 (patch) | |
tree | 9ff04a8cffbf19c0dd340543ca878663c8b5f171 | |
parent | 0161cd4bb896b626129d35206303905d8d2c414e (diff) | |
download | scummvm-rg350-7be171f910b9368dc93691886303ee9c964c0c80.tar.gz scummvm-rg350-7be171f910b9368dc93691886303ee9c964c0c80.tar.bz2 scummvm-rg350-7be171f910b9368dc93691886303ee9c964c0c80.zip |
changed actor walking for V2 games a bit; this fixes bug #774529 (Zak: Annie walking in funny places)
svn-id: r10185
-rw-r--r-- | scumm/actor.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 3e38cab8f4..cb8ea153ff 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1402,17 +1402,17 @@ void Actor::walkActorOld() { if (!moving) return; - + if (!(moving & MF_NEW_LEG)) { if (moving & MF_IN_LEG && actorWalkStep()) return; - + if (moving & MF_LAST_LEG) { moving = 0; startWalkAnim(3, walkdata.destdir); return; } - + if (moving & MF_TURN) { new_dir = updateActorDirection(false); if (facing != new_dir) @@ -1421,7 +1421,7 @@ void Actor::walkActorOld() { moving = 0; return; } - + if (walkdata.point3.x != 32000) { if (calcMovementFactor(walkdata.point3)) { walkdata.point3.x = 32000; @@ -1429,7 +1429,7 @@ void Actor::walkActorOld() { } walkdata.point3.x = 32000; } - + setBox(walkdata.curbox); moving &= MF_IN_LEG; } @@ -1460,26 +1460,22 @@ void Actor::walkActorOld() { walkdata.curbox = next_box; -/* if (_vm->_version <= 2) { _vm->getClosestPtOnBox(walkdata.curbox, x, y, p2.x, p2.y); _vm->getClosestPtOnBox(walkbox, p2.x, p2.y, p3.x, p3.y); } else { -*/ - findPathTowardsOld(walkbox, next_box, walkdata.destbox, p2, p3); - if (p2.x == 32000 && p3.x == 32000) { - break; - } - - if (p2.x != 32000) { - if (calcMovementFactor(p2)) { - walkdata.point3 = p3; - return; + findPathTowardsOld(walkbox, next_box, walkdata.destbox, p2, p3); + if (p2.x == 32000 && p3.x == 32000) { + break; + } + + if (p2.x != 32000) { + if (calcMovementFactor(p2)) { + walkdata.point3 = p3; + return; + } } } -/* - } -*/ if (calcMovementFactor(p3)) return; |