[Scummvm-git-logs] scummvm master -> 645c5a072244656de27452f52f5897201b91e2a7
alexbevi
noreply at scummvm.org
Tue Sep 1 10:45:03 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
645c5a0722 ASYLUM: Fix Chapter 4 wagon fade race condition with Timber animation
Commit: 645c5a072244656de27452f52f5897201b91e2a7
https://github.com/scummvm/scummvm/commit/645c5a072244656de27452f52f5897201b91e2a7
Author: Alex Bevilacqua (alex at alexbevi.com)
Date: 2026-09-01T06:44:22-04:00
Commit Message:
ASYLUM: Fix Chapter 4 wagon fade race condition with Timber animation
Fixes #16967.
Assisted-by: Codex:gpt-5.6-sol
Changed paths:
engines/asylum/resources/script.cpp
engines/asylum/resources/script.h
diff --git a/engines/asylum/resources/script.cpp b/engines/asylum/resources/script.cpp
index 15cdf454cc4..95bdf2e13bf 100644
--- a/engines/asylum/resources/script.cpp
+++ b/engines/asylum/resources/script.cpp
@@ -261,6 +261,10 @@ void ScriptManager::load(Common::SeekableReadStream *stream) {
_scripts.push_back(script);
}
+ patchScriptData();
+}
+
+void ScriptManager::patchScriptData() {
// Patch for Chapter 2 Lockout bug
if (_vm->checkGameVersion("Unpatched") && getWorld()->chapter == kChapter2) {
_scripts[ 3].commands[ 2].param1 = 1506;
@@ -273,11 +277,27 @@ void ScriptManager::load(Common::SeekableReadStream *stream) {
_scripts[1].commands[6].param2 = 151;
_scripts[1].commands[6].param3 = 332;
}
+
+ // Script 13 cancels a pending wagon exit fade by setting flag 480. The
+ // shipped command tests flag 479, which remains set until that fade ends.
+ if (getWorld()->chapter == kChapter4) {
+ ScriptEntry &wagonEnter = _scripts[13].commands[0];
+
+ if (wagonEnter.opcode == kOpcodeJumpIfGameFlag
+ && wagonEnter.param1 == 479
+ && wagonEnter.param2 == 0
+ && wagonEnter.param3 == 4) {
+ wagonEnter.param1 = 480;
+ }
+ }
}
void ScriptManager::saveLoadWithSerializer(Common::Serializer &s) {
for (uint i = 0; i < _scripts.size(); i++)
_scripts[i].saveLoadWithSerializer(s);
+
+ if (s.isLoading())
+ patchScriptData();
}
// Save the script queue (in the original, it is part of the shared data)
diff --git a/engines/asylum/resources/script.h b/engines/asylum/resources/script.h
index 1b5c4a732ec..28f3645e579 100644
--- a/engines/asylum/resources/script.h
+++ b/engines/asylum/resources/script.h
@@ -333,6 +333,8 @@ private:
Script *_currentScript;
ScriptQueueEntry *_currentQueueEntry;
+ void patchScriptData();
+
// Opcode helper functions
void enableObject(ScriptEntry *cmd, ObjectTransparency type);
void setActionFlag(ScriptEntry *cmd, ActionType flag); //|
More information about the Scummvm-git-logs
mailing list