aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/script.cpp5
-rw-r--r--engines/scumm/script_v8.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index cc37099be9..b7a3422021 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -617,9 +617,8 @@ void ScummEngine::writeVar(uint var, int value) {
}
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
- uint talkspeed = getTalkspeed();
- if (talkspeed <= 9)
- VAR(VAR_CHARINC) = talkspeed;
+ _defaultTalkDelay = 9 - getTalkspeed();
+ VAR(VAR_CHARINC) = _defaultTalkDelay;
} else {
_scummVars[var] = value;
}
diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp
index 9bf3ba5b1e..4e52ce3bfd 100644
--- a/engines/scumm/script_v8.cpp
+++ b/engines/scumm/script_v8.cpp
@@ -420,9 +420,8 @@ void ScummEngine_v8::writeVar(uint var, int value) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) {
- uint talkspeed = getTalkspeed();
- if (talkspeed <= 9)
- VAR(VAR_CHARINC) = talkspeed;
+ _defaultTalkDelay = 9 - getTalkspeed();
+ VAR(VAR_CHARINC) = _defaultTalkDelay;
} else
_scummVars[var] = value;