From 165f7fcf73302a08cad5eddf24a00889f56cdefb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 31 Jul 2007 04:19:23 +0000 Subject: Implement some differences to the actor walking code in IHNM svn-id: r28352 --- engines/saga/actor.cpp | 29 +++++++++++++++++------------ 1 file 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; + } } } } -- cgit v1.2.3