Update talkspeed config setting, when set by game scripts
svn-id: r22854
This commit is contained in:
parent
93a91f9c6d
commit
fc26d9b413
2 changed files with 8 additions and 9 deletions
|
@ -618,15 +618,15 @@ void ScummEngine::writeVar(uint var, int value) {
|
||||||
|
|
||||||
if (var == VAR_CHARINC) {
|
if (var == VAR_CHARINC) {
|
||||||
if (ConfMan.hasKey("talkspeed")) {
|
if (ConfMan.hasKey("talkspeed")) {
|
||||||
VAR(VAR_CHARINC) = getTalkspeed();
|
value = getTalkspeed();
|
||||||
} else {
|
} else {
|
||||||
// Save the new talkspeed value to ConfMan
|
// 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 ((_varwatch == (int)var) || (_varwatch == 0)) {
|
||||||
if (vm.slot[_currentScript].number < 100)
|
if (vm.slot[_currentScript].number < 100)
|
||||||
debug(1, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
|
debug(1, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
|
||||||
|
|
|
@ -421,16 +421,15 @@ void ScummEngine_v8::writeVar(uint var, int value) {
|
||||||
|
|
||||||
if (var == VAR_CHARINC) {
|
if (var == VAR_CHARINC) {
|
||||||
if (ConfMan.hasKey("talkspeed")) {
|
if (ConfMan.hasKey("talkspeed")) {
|
||||||
_defaultTalkDelay = getTalkspeed();
|
value = getTalkspeed();
|
||||||
VAR(VAR_CHARINC) = _defaultTalkDelay;
|
|
||||||
} else {
|
} else {
|
||||||
// Save the new talkspeed value to ConfMan
|
// 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 ((_varwatch == (int)var) || (_varwatch == 0)) {
|
||||||
if (vm.slot[_currentScript].number < 100)
|
if (vm.slot[_currentScript].number < 100)
|
||||||
debugC(DEBUG_VARS, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
|
debugC(DEBUG_VARS, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue