From 327d4a1ccff41af28b010679a29168b7e839de29 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 10 Aug 2013 17:32:57 -0500 Subject: ZVISION: Implement ActionChangeLocation::execute() --- engines/zvision/actions.cpp | 6 ++++-- engines/zvision/scr_file_handling.cpp | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/zvision') diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index 8c10837a1f..4fe77c19ce 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -87,8 +87,10 @@ ActionChangeLocation::ActionChangeLocation(const Common::String &line) { } bool ActionChangeLocation::execute(ZVision *engine) { - // TODO: Implement - return true; + // We can't directly call ScriptManager::ChangeLocationIntern() because doing so clears all the Puzzles, and thus would corrupt the current puzzle checking + engine->getScriptManager()->changeLocation(_world, _room, _node, _view, _x); + // Tell the puzzle system to stop checking any more puzzles + return false; } diff --git a/engines/zvision/scr_file_handling.cpp b/engines/zvision/scr_file_handling.cpp index efd122994d..a47bf0fc0c 100644 --- a/engines/zvision/scr_file_handling.cpp +++ b/engines/zvision/scr_file_handling.cpp @@ -162,8 +162,7 @@ void ScriptManager::parseResults(Common::SeekableReadStream &stream, Common::Lis } else if (line.matchString("*:change_location*", true)) { - - + actionList.push_back(Common::SharedPtr(new ActionChangeLocation(line))); } else if (line.matchString("*:crossfade*", true)) { -- cgit v1.2.3