aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker/tucker.cpp
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-02-25 19:53:37 +0100
committerAdrian Frühwirth2018-02-25 20:07:21 +0100
commitc55ee3f967be191c4b7ca481b266ee55f7b437b8 (patch)
tree2986346a16a582140ee4cf357324f6364e55eeaf /engines/tucker/tucker.cpp
parent9f1f5057c99e3f5e2b196d7da9995d8fd8fcaae1 (diff)
downloadscummvm-rg350-c55ee3f967be191c4b7ca481b266ee55f7b437b8.tar.gz
scummvm-rg350-c55ee3f967be191c4b7ca481b266ee55f7b437b8.tar.bz2
scummvm-rg350-c55ee3f967be191c4b7ca481b266ee55f7b437b8.zip
TUCKER: Confine Bud to walkable area when entering club
When Bud is walked to specific coordinates using the 'buw' opcode the walkable area is not enforced (_locationMaskIgnore == true). This is usually not a problem because the player is not allowed to click, however, when entering the club, this allows the player to move Bud to coordinates from which he can never return, leaving him stuck there. As a workaround, do not ignore the location mask during this specific action when entering the club. Fixes Trac#5838.
Diffstat (limited to 'engines/tucker/tucker.cpp')
-rw-r--r--engines/tucker/tucker.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index ec27db0b26..d4640a8927 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -3256,7 +3256,19 @@ int TuckerEngine::executeTableInstruction() {
case kCode_buw:
_selectedObject._xPos = readTableInstructionParam(3);
_selectedObject._yPos = readTableInstructionParam(3);
- _locationMaskIgnore = true;
+
+ // WORKAROUND: original game bug
+ // When Bud is walked to specific coordinates using the 'buw' opcode the
+ // walkable area is not enforced (_locationMaskIgnore == true).
+ // This is usually not a problem because the player is not allowed to click,
+ // however, when entering the club, this allows the player to move Bud to
+ // coordinates from which he can never return, leaving him stuck there.
+ // As a workaround, do not ignore the location mask during this specific
+ // action when entering the club.
+ // This fixes Trac#5838.
+ if (!(_locationNum == 6 && _nextAction == 59)) {
+ _locationMaskIgnore = true;
+ }
_panelLockedFlag = true;
return 0;
case kCode_bux: