diff options
author | Evgeny Grechnikov | 2018-09-24 01:57:44 +0300 |
---|---|---|
committer | Evgeny Grechnikov | 2018-09-24 01:57:44 +0300 |
commit | f057ac75ce86db465a75193a40358b3226bcf099 (patch) | |
tree | 3fdab724ef78fa76864a4ff241203a52cc12cdcb /engines/lastexpress/entities/milos.cpp | |
parent | 875ce8101c9c67d7c38bad9ddc263a46eb0c758a (diff) | |
download | scummvm-rg350-f057ac75ce86db465a75193a40358b3226bcf099.tar.gz scummvm-rg350-f057ac75ce86db465a75193a40358b3226bcf099.tar.bz2 scummvm-rg350-f057ac75ce86db465a75193a40358b3226bcf099.zip |
LASTEXPRESS: more fixes in NPC logic
Diffstat (limited to 'engines/lastexpress/entities/milos.cpp')
-rw-r--r-- | engines/lastexpress/entities/milos.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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) { |