From b7deac38b3a529701a9c4866062e1db2db6214c4 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Thu, 29 May 2008 22:07:25 +0000 Subject: Added check in modifyObjectParam's start (Verified with FW & OS PC versions' disassemblies). Also removed superfluous default-case, hopefully no compiler will complain about this :). svn-id: r32371 --- engines/cine/object.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/cine/object.cpp') diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index d7b4b853ae..7666f05352 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -185,6 +185,10 @@ void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) { } void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { + // Operation Stealth checks object index range, Future Wars doesn't. + if (g_cine->getGameType() == Cine::GType_OS && objIdx >= NUM_MAX_OBJECT) + return; + switch (paramIdx) { case 1: objectTable[objIdx].x = newValue; @@ -214,8 +218,6 @@ void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { case 6: objectTable[objIdx].part = newValue; break; - default: // No-operation - break; } } -- cgit v1.2.3