From c55ee3f967be191c4b7ca481b266ee55f7b437b8 Mon Sep 17 00:00:00 2001 From: Adrian Frühwirth Date: Sun, 25 Feb 2018 19:53:37 +0100 Subject: 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. --- engines/tucker/tucker.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'engines/tucker') 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: -- cgit v1.2.3