diff options
-rw-r--r-- | engines/lure/hotspots.h | 2 | ||||
-rw-r--r-- | engines/lure/scripts.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h index 83c2e76c0e..5ff0ec563f 100644 --- a/engines/lure/hotspots.h +++ b/engines/lure/hotspots.h @@ -236,7 +236,6 @@ private: BarPlaceResult getBarPlace(); bool findClearBarPlace(); bool characterWalkingCheck(uint16 id); - bool doorCloseCheck(uint16 doorId); void resetDirection(); // Action set @@ -450,6 +449,7 @@ public: void updateMovement(); void updateMovement2(CharacterMode value); void resetPosition(); + bool doorCloseCheck(uint16 doorId); void doAction(); void doAction(Action action, HotspotData *hotspot); diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 20758466ad..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); |