From 3beb48f5ced89ba5521d5f6729534332db6b76d9 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sat, 4 Mar 2017 16:44:15 +0100 Subject: ADL: Fix error() when opening GMM during intro This is a regression from 516815d --- engines/adl/adl_v2.cpp | 3 +++ engines/adl/hires6.cpp | 3 +++ 2 files changed, 6 insertions(+) (limited to 'engines/adl') diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp index dfc2df6ef4..6eb26c515e 100644 --- a/engines/adl/adl_v2.cpp +++ b/engines/adl/adl_v2.cpp @@ -634,6 +634,9 @@ int AdlEngine_v2::o2_initDisk(ScriptEnv &e) { } bool AdlEngine_v2::canSaveGameStateCurrently() { + if (!_canSaveNow) + return false; + // Back up first visit flag as it may be changed by this test const bool isFirstTime = getCurRoom().isFirstTime; const bool retval = AdlEngine::canSaveGameStateCurrently(); diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp index 02ef0f022a..a8d2f3f88c 100644 --- a/engines/adl/hires6.cpp +++ b/engines/adl/hires6.cpp @@ -206,6 +206,9 @@ int HiRes6Engine::o_fluteSound(ScriptEnv &e) { } bool HiRes6Engine::canSaveGameStateCurrently() { + if (!_canSaveNow) + return false; + // Back up variables that may be changed by this test const byte var2 = getVar(2); const byte var24 = getVar(24); -- cgit v1.2.3