From f057ac75ce86db465a75193a40358b3226bcf099 Mon Sep 17 00:00:00 2001 From: Evgeny Grechnikov Date: Mon, 24 Sep 2018 01:57:44 +0300 Subject: LASTEXPRESS: more fixes in NPC logic --- engines/lastexpress/entities/milos.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/lastexpress/entities/milos.cpp') diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 8177f99ff6..d982b5585a 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -141,7 +141,6 @@ IMPLEMENT_FUNCTION_II(10, Milos, enterCompartmentDialog, CarIndex, EntityPositio if (getEvent(kEventMilosTylerCompartmentDefeat)) { // Robert saying: "Milos" switch(rnd(3)) { - default: case 0: getSound()->playSound(kEntityPlayer, "CAT1014"); break; @@ -443,7 +442,7 @@ IMPLEMENT_FUNCTION(14, Milos, function14) ++params->param5; switch (params->param5) { default: - getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand); + getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 == 0 ? kCursorTalk : kCursorNormal, kCursorHand); CURRENT_PARAM(1, 2) = 0; break; @@ -467,7 +466,7 @@ IMPLEMENT_FUNCTION(14, Milos, function14) if (params->param7 < 3) { params->param5 = 1; - getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand); + getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 == 0 ? kCursorTalk : kCursorNormal, kCursorHand); CURRENT_PARAM(1, 2) = 0; break; } @@ -645,7 +644,7 @@ label_callback_12: case 7: case 9: case 11: - getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 < 1 ? kCursorTalk : kCursorNormal, kCursorHand); + getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).status, params->param3 == 0 ? kCursorTalk : kCursorNormal, kCursorHand); CURRENT_PARAM(1, 2) = 0; break; @@ -1367,9 +1366,13 @@ IMPLEMENT_FUNCTION(25, Milos, function25) case 3: getObjects()->update(kObjectCompartmentG, kEntityMilos, kObjectLocation1, kCursorTalk, kCursorNormal); - getObjects()->update(kObjectCompartmentG, kEntityMilos, kObjectLocation1, kCursorHandKnock, kCursorHand); params->param1 = 1; + // BUG: the original game executes the last line of [case 4:] here too, resetting cursor once again. + // We get here when Cath knocks or tries to enter the compartment G when Vesna is there, + // after Vesna says VES1015A (in Serbian, supposedly a variant of "Who is it?"). + // The action for next knock / attempt to enter is saying CAT1505/CAT1505A, + // so the cursor should be kCursorTalk and not kCursorHandKnock as in the original game. break; case 4: @@ -1524,7 +1527,6 @@ IMPLEMENT_FUNCTION(29, Milos, chapter4Handler) getSound()->playSound(kEntityMilos, sound); \ if (getEntities()->isDistanceBetweenEntities(kEntityMilos, kEntityPlayer, 2000)) \ getProgress().field_94 = 1; \ - break; \ } switch (savepoint.action) { -- cgit v1.2.3