diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/saga/actor.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
Diffstat (limited to 'engines/saga/actor.cpp')
-rw-r--r-- | engines/saga/actor.cpp | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index d7882a78fd..c2ecff4a1a 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -897,7 +897,9 @@ void Actor::updateActorsScene(int actorsEntrance) { } } - assert(_protagonist); + // _protagonist can be null while loading a game from the command line + if (_protagonist == NULL) + return; if ((actorsEntrance >= 0) && (_vm->_scene->_entryList.entryListCount > 0)) { if (_vm->_scene->_entryList.entryListCount <= actorsEntrance) { @@ -1605,7 +1607,9 @@ void Actor::handleActions(int msec, bool setup) { if (actor->_lastZone) stepZoneAction(actor, actor->_lastZone, true, false); actor->_lastZone = hitZone; - if (hitZone) + // WORKAROUND for graphics glitch in the rat caves. Don't do this step zone action in the rat caves + // (room 51) to avoid the glitch + if (hitZone && !(_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneNumber() == 51)) stepZoneAction(actor, hitZone, false, false); } } @@ -2127,7 +2131,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)) { @@ -2140,17 +2147,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; + } } } } |