aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRichieSams2015-01-18 19:26:49 -0600
committerRichieSams2015-01-18 19:26:49 -0600
commitb835eacc0cd401bb0d15a33e60d2ac47ebb4d718 (patch)
tree86756597b30aeca2571c60023e2d48d8be4cdaca /engines
parenta26a9c7268d27cb1f7407f5cf48038303f443197 (diff)
downloadscummvm-rg350-b835eacc0cd401bb0d15a33e60d2ac47ebb4d718.tar.gz
scummvm-rg350-b835eacc0cd401bb0d15a33e60d2ac47ebb4d718.tar.bz2
scummvm-rg350-b835eacc0cd401bb0d15a33e60d2ac47ebb4d718.zip
ZVISION: Don't change location when coming back from ScummVM save dialog
Fixes bug # 6771 We don't need to change locations, since we use the ScummVM save dialog instead of the original one (which is actually a location). Instead we just need to reset _nextLocation to _currentLocation so the engine can stop trying to save. If we change locations, the StateKey_LastWorld/Room/etc. end up being overwritten with the current room. So if a script refers to location 0, 0, 0, 0 (aka, the last room), the engine will try to change location to the same room.
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/scripting/script_manager.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp
index 4792a02045..a4ab4579b5 100644
--- a/engines/zvision/scripting/script_manager.cpp
+++ b/engines/zvision/scripting/script_manager.cpp
@@ -576,11 +576,8 @@ void ScriptManager::ChangeLocationReal() {
_nextLocation.node = _currentLocation.node;
_nextLocation.view = _currentLocation.view;
_nextLocation.offset = _currentLocation.offset;
- _currentLocation.world = '0';
- _currentLocation.room = '0';
- _currentLocation.node = '0';
- _currentLocation.view = '0';
- _currentLocation.offset = 0;
+
+ return;
} else {
return;
}
@@ -743,11 +740,6 @@ void ScriptManager::deserialize(Common::SeekableReadStream *stream) {
cleanScriptScope(room);
cleanScriptScope(world);
- _currentLocation.node = 0;
- _currentLocation.world = 0;
- _currentLocation.room = 0;
- _currentLocation.view = 0;
-
for (SideFXList::iterator iter = _activeSideFx.begin(); iter != _activeSideFx.end(); iter++) {
delete(*iter);
}