From 260811106c37dbda60c3c1cd312f790ceead721a Mon Sep 17 00:00:00 2001 From: Miroslav Remák Date: Wed, 29 Aug 2018 18:37:48 +0200 Subject: MUTATIONOFJB: Allow script commands to access all objects. Previously objects with IDs beyond the defined number of objects were not accessible to IfCommand and ChangeObjectCommand. For example, this would cause script errors inside Fisher's house. --- engines/mutationofjb/commands/changecommand.cpp | 2 +- engines/mutationofjb/commands/ifcommand.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/mutationofjb/commands/changecommand.cpp b/engines/mutationofjb/commands/changecommand.cpp index 9051e8eeaa..c97fe726d7 100644 --- a/engines/mutationofjb/commands/changecommand.cpp +++ b/engines/mutationofjb/commands/changecommand.cpp @@ -405,7 +405,7 @@ Command::ExecuteResult ChangeObjectCommand::execute(ScriptExecutionContext &scri return Finished; } - Object *const object = scene->getObject(_entityId); + Object *const object = scene->getObject(_entityId, true); if (!object) { return Finished; } diff --git a/engines/mutationofjb/commands/ifcommand.cpp b/engines/mutationofjb/commands/ifcommand.cpp index 47e06f3309..fb48787af2 100644 --- a/engines/mutationofjb/commands/ifcommand.cpp +++ b/engines/mutationofjb/commands/ifcommand.cpp @@ -89,7 +89,7 @@ Command::ExecuteResult IfCommand::execute(ScriptExecutionContext &scriptExecCtx) return Finished; } - Object *const object = scene->getObject(_objectId); + Object *const object = scene->getObject(_objectId, true); if (!object) { return Finished; } -- cgit v1.2.3