aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/adl.cpp
diff options
context:
space:
mode:
authorWalter van Niftrik2017-02-23 16:01:46 +0100
committerWalter van Niftrik2017-02-23 16:12:48 +0100
commit516815d5f5f47f3e83576975eaa3e95b64719340 (patch)
treeab8227417ffa6afeaf86252ec062c5ca1f9b6c8c /engines/adl/adl.cpp
parentf0b1c46caf097b8e6f65047642e6f64a205e9329 (diff)
downloadscummvm-rg350-516815d5f5f47f3e83576975eaa3e95b64719340.tar.gz
scummvm-rg350-516815d5f5f47f3e83576975eaa3e95b64719340.tar.bz2
scummvm-rg350-516815d5f5f47f3e83576975eaa3e95b64719340.zip
ADL: Fix hires6 canSaveGameStateCurrently()
Diffstat (limited to 'engines/adl/adl.cpp')
-rw-r--r--engines/adl/adl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index 1f0b0b173a..3887fa92d9 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -891,6 +891,12 @@ bool AdlEngine::canSaveGameStateCurrently() {
// Here we check whether or not the game currently accepts the command
// "SAVE GAME". This prevents saving via the GMM in situations where
// it wouldn't otherwise be possible to do so.
+ for (cmd = _roomData.commands.begin(); cmd != _roomData.commands.end(); ++cmd) {
+ ScriptEnv env(*cmd, _state.room, _saveVerb, _saveNoun);
+ if (matchCommand(env))
+ return env.op() == IDO_ACT_SAVE;
+ }
+
for (cmd = _roomCommands.begin(); cmd != _roomCommands.end(); ++cmd) {
ScriptEnv env(*cmd, _state.room, _saveVerb, _saveNoun);
if (matchCommand(env))