diff options
author | Travis Howell | 2009-01-11 06:51:17 +0000 |
---|---|---|
committer | Travis Howell | 2009-01-11 06:51:17 +0000 |
commit | 954a1d27d8705fa31a0cbf2f6a6597f4522b9071 (patch) | |
tree | b0b542cdeb5ce1631688839d9450a5de3d81508b /engines/scumm | |
parent | 4e15c8df3517661ae9ed092409d2057f424c79d6 (diff) | |
download | scummvm-rg350-954a1d27d8705fa31a0cbf2f6a6597f4522b9071.tar.gz scummvm-rg350-954a1d27d8705fa31a0cbf2f6a6597f4522b9071.tar.bz2 scummvm-rg350-954a1d27d8705fa31a0cbf2f6a6597f4522b9071.zip |
Fix talkspeed settings again.
svn-id: r35821
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/script_v8.cpp | 7 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 8859435dc9..b85f123e8d 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -423,7 +423,12 @@ void ScummEngine_v8::writeVar(uint var, int value) { assertRange(0, var, _numVariables - 1, "variable (writing)"); if (var == VAR_CHARINC) { - if (ConfMan.hasKey("talkspeed")) { + // Did the user override the talkspeed manually? Then use that. + // Otherwise, use the value specified by the game script. + // Note: To determine whether there was a user override, we only + // look at the target specific settings, assuming that any global + // value is likely to be bogus. See also bug #2251765. + if (ConfMan.hasKey("talkspeed", _targetName)) { value = getTalkDelay(); } else { // Save the new talkspeed value to ConfMan diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index f238ec4b37..78329dd3e4 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1706,9 +1706,11 @@ void ScummEngine::syncSoundSettings() { if (VAR_VOICE_MODE != 0xFF) VAR(VAR_VOICE_MODE) = _voiceMode; - _defaultTalkDelay = getTalkDelay(); - if (VAR_CHARINC != 0xFF) - VAR(VAR_CHARINC) = _defaultTalkDelay; + if (ConfMan.hasKey("talkspeed", _targetName)) { + _defaultTalkDelay = getTalkDelay(); + if (VAR_CHARINC != 0xFF) + VAR(VAR_CHARINC) = _defaultTalkDelay; + } } void ScummEngine::setTalkDelay(int talkdelay) { |