diff options
author | Filippos Karapetis | 2007-07-31 04:19:23 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-07-31 04:19:23 +0000 |
commit | 165f7fcf73302a08cad5eddf24a00889f56cdefb (patch) | |
tree | e9d729296a67dce14b7cdc66d5fdacedf88e0047 /engines | |
parent | 34292a6b586a44aa8fb9361369dddf854ce999c6 (diff) | |
download | scummvm-rg350-165f7fcf73302a08cad5eddf24a00889f56cdefb.tar.gz scummvm-rg350-165f7fcf73302a08cad5eddf24a00889f56cdefb.tar.bz2 scummvm-rg350-165f7fcf73302a08cad5eddf24a00889f56cdefb.zip |
Implement some differences to the actor walking code in IHNM
svn-id: r28352
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/actor.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 2df186f093..5cb91b8663 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -2129,7 +2129,10 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) { if ((((actor->_currentAction >= kActionWalkToPoint) && (actor->_currentAction <= kActionWalkDir)) || (actor == _protagonist)) && !_vm->_scene->canWalk(pointFrom)) { - for (i = 1; i < 8; i++) { + + int max = _vm->getGameType() == GType_ITE ? 8 : 4; + + for (i = 1; i < max; i++) { pointAdd = pointFrom; pointAdd.y += i; if (_vm->_scene->canWalk(pointAdd)) { @@ -2142,17 +2145,19 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) { pointFrom = pointAdd; break; } - pointAdd = pointFrom; - pointAdd.x += i; - if (_vm->_scene->canWalk(pointAdd)) { - pointFrom = pointAdd; - break; - } - pointAdd = pointFrom; - pointAdd.x -= i; - if (_vm->_scene->canWalk(pointAdd)) { - pointFrom = pointAdd; - break; + if (_vm->getGameType() == GType_ITE) { + pointAdd = pointFrom; + pointAdd.x += i; + if (_vm->_scene->canWalk(pointAdd)) { + pointFrom = pointAdd; + break; + } + pointAdd = pointFrom; + pointAdd.x -= i; + if (_vm->_scene->canWalk(pointAdd)) { + pointFrom = pointAdd; + break; + } } } } |