ZVISION: Directly access _globalState instead of using setStateValue
setStateValue does a _referenceTable lookup and potentially adds Puzzles to _puzzlesToCheck. We know that _referenceTable and _puzzlesToCheck with be cleared during ScriptManager::changeLocation(), so using setStateValues ends up just being wasteful.
This commit is contained in:
parent
51fc627c05
commit
8f7fa517d6
1 changed files with 2 additions and 1 deletions
|
@ -399,7 +399,8 @@ void ScriptManager::deserializeStateTable(Common::SeekableReadStream *stream) {
|
||||||
for (uint32 i = 0; i < numberOfPairs; i++) {
|
for (uint32 i = 0; i < numberOfPairs; i++) {
|
||||||
uint32 key = stream->readUint32LE();
|
uint32 key = stream->readUint32LE();
|
||||||
uint32 value = stream->readUint32LE();
|
uint32 value = stream->readUint32LE();
|
||||||
setStateValue(key, value);
|
// Directly access the state table so we don't trigger Puzzle checks
|
||||||
|
_globalState[key] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue