diff options
Diffstat (limited to 'engines/scumm/script_v8.cpp')
-rw-r--r-- | engines/scumm/script_v8.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 8dae96397d..f9e6e11c30 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -421,16 +421,15 @@ void ScummEngine_v8::writeVar(uint var, int value) { if (var == VAR_CHARINC) { if (ConfMan.hasKey("talkspeed")) { - _defaultTalkDelay = getTalkspeed(); - VAR(VAR_CHARINC) = _defaultTalkDelay; + value = getTalkspeed(); } else { // Save the new talkspeed value to ConfMan - setTalkspeed(_defaultTalkDelay); + setTalkspeed(value); } - } else { - _scummVars[var] = value; } + _scummVars[var] = value; + if ((_varwatch == (int)var) || (_varwatch == 0)) { if (vm.slot[_currentScript].number < 100) debugC(DEBUG_VARS, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number); |