aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/scripts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lure/scripts.cpp')
-rw-r--r--engines/lure/scripts.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 41a09e0d1d..20cbd328ce 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -901,6 +901,16 @@ uint16 Script::execute(uint16 startOffset) {
uint16 offset = startOffset;
bool breakFlag = false;
+ // WORKAROUND: Prevents the Weregate door closing prematurely
+ if (startOffset == 3941) {
+ Hotspot *goewinHotspot = r.getActiveHotspot(GOEWIN_ID);
+ if (!goewinHotspot->doorCloseCheck(10025)) {
+ // Goewin is still blocking the door, so reschedule the closing
+ r.delayList().add(1, startOffset, false);
+ return 0;
+ }
+ }
+
param = 0;
fields.setField(SEQUENCE_RESULT, 0);
@@ -1297,6 +1307,11 @@ bool HotspotScript::execute(Hotspot *h) {
default:
// Set the animation frame number
+
+ // WORKAROUND: In Lure English EGA, the apparatus in room #30 can be set with an invalid frame number
+ if ((h->hotspotId() == 1059) && (opcode >= h->numFrames()))
+ opcode = h->numFrames() - 1;
+
debugC(ERROR_DETAILED, kLureDebugScripts, "SET FRAME NUMBER = %d", opcode);
h->setFrameNumber(opcode);