mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 03:40:25 +00:00
SCUMM: Fix leftover verbs when giving objects to other characters
It looks like the input script - or at least this particular input script - expects to be called twice. Once to clear the verbs and once for the recipient to accept/reject your offer. In the 256-color DOS version, both of these are done during the same call. I don't know if this applies to other input scripts as well, but I'm limiting it to this one for now.
This commit is contained in:
parent
671a169153
commit
5b2ca72a32
@ -1412,8 +1412,26 @@ void ScummEngine::runInputScript(int clickArea, int val, int mode) {
|
||||
_lastInputScriptTime = time;
|
||||
}
|
||||
|
||||
if (verbScript)
|
||||
runScript(verbScript, 0, 0, args);
|
||||
if (verbScript) {
|
||||
// It seems that script 18 expects to be called twice: Once
|
||||
// with parameter 1 (kVerbClickArea) to clear all the verbs,
|
||||
// and once with 3 (kInventoryClickArea) to print the "Take
|
||||
// this <something>" message.
|
||||
//
|
||||
// In the 256-color DOS version, this is all done in the same
|
||||
// call to the script.
|
||||
//
|
||||
// Should this workaround apply to other input scripts
|
||||
// as well? I don't know.
|
||||
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh && verbScript == 18 && val >= 101 && val <= 106) {
|
||||
args[0] = kVerbClickArea;
|
||||
runScript(verbScript, 0, 0, args);
|
||||
|
||||
args[0] = kInventoryClickArea;
|
||||
runScript(verbScript, 0, 0, args);
|
||||
} else
|
||||
runScript(verbScript, 0, 0, args);
|
||||
}
|
||||
}
|
||||
|
||||
void ScummEngine::decreaseScriptDelay(int amount) {
|
||||
|
Loading…
Reference in New Issue
Block a user