diff options
-rw-r--r-- | engines/prince/prince.cpp | 4 | ||||
-rw-r--r-- | engines/prince/script.cpp | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index e08c2ebb1a..b44b136895 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -2009,8 +2009,8 @@ void PrinceEngine::walkTo() { _mainHero->_destDirection = _mobList[_optionsMob]._examDirection; } else { Common::Point mousePos = _system->getEventManager()->getMousePos(); - destX = mousePos.x; - destY = mousePos.y; + destX = mousePos.x + _picWindowX; + destY = mousePos.y + _picWindowY; _mainHero->_destDirection = 0; } _mainHero->_coords = makePath(destX, destY); diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 3f76b91fb7..3ae974e4f7 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -956,9 +956,19 @@ void Interpreter::O_MOVEHERO() { void Interpreter::O_WALKHERO() { uint16 heroId = readScriptFlagValue(); - + Hero *hero = nullptr; + if (!heroId) { + hero = _vm->_mainHero; + } else if (heroId == 1) { + hero = _vm->_secondHero; + } + if (hero != nullptr) { + if (hero->_state != Hero::STAY) { + _currentInstruction -= 4; + _opcodeNF = 1; + } + } debugInterpreter("O_WALKHERO %d", heroId); - _opcodeNF = 1; } void Interpreter::O_SETHERO() { |