aboutsummaryrefslogtreecommitdiff
path: root/engines/sky/logic.cpp
diff options
context:
space:
mode:
authorJoost Peters2011-09-12 13:54:48 +0200
committerJoost Peters2011-09-12 13:56:28 +0200
commit2eb624b22982018da97cbac4c8b0536f338146f8 (patch)
tree39e6ff6f9fb529a451e944c6812c6de74f5ff020 /engines/sky/logic.cpp
parent5f034cf065d3e6b313b86dbbd8d67cf0a4b4fdb9 (diff)
downloadscummvm-rg350-2eb624b22982018da97cbac4c8b0536f338146f8.tar.gz
scummvm-rg350-2eb624b22982018da97cbac4c8b0536f338146f8.tar.bz2
scummvm-rg350-2eb624b22982018da97cbac4c8b0536f338146f8.zip
SKY: fix bug #3149412: Invalid Mode when giving shades to travel agent
Diffstat (limited to 'engines/sky/logic.cpp')
-rw-r--r--engines/sky/logic.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 616670b0fd..a69ba793f2 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -1248,6 +1248,17 @@ script:
debug(3, "Doing Script: %d:%d:%x", moduleNo, scriptNo & 0xFFF, offset ? (offset - moduleStart[scriptNo & 0xFFF]) : 0);
+ // WORKAROUND for bug #3149412: "Invalid Mode when giving shades to travel agent"
+ // Using the dark glasses on Trevor (travel agent) multiple times in succession would
+ // wreck the trevor compact's mode, as the script in question doesn't account for using
+ // this item at this point in the game (you will only have it here if you play the game
+ // in an unusual way) and thus would loop indefinitely / never drop out.
+ // To prevent this, we trigger the generic response by pretending we're using an item
+ // which the script /does/ handle.
+ if (scriptNo == TREVOR_SPEECH && _scriptVariables[OBJECT_HELD] == IDO_SHADES)
+ _scriptVariables[OBJECT_HELD] = IDO_GLASS;
+
+
// Check whether we have an offset or what
if (offset)
scriptData = moduleStart + offset;