[Scummvm-git-logs] scummvm branch-2-1 -> cd545fb8ce777f4d3a93fc5823e4d6cefe39def3
athrxx
athrxx at scummvm.org
Wed Jan 8 22:17:35 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cd545fb8ce KYRA: (LOK) - workaround for green potion animation
Commit: cd545fb8ce777f4d3a93fc5823e4d6cefe39def3
https://github.com/scummvm/scummvm/commit/cd545fb8ce777f4d3a93fc5823e4d6cefe39def3
Author: athrxx (athrxx at scummvm.org)
Date: 2020-01-08T23:16:42+01:00
Commit Message:
KYRA: (LOK) - workaround for green potion animation
The optional green potion that can be made at the alchemists' crystals can lead to invalid memory access. The animation frames aren't properly cleaned up like in the snake poisoning sequence.
I just add the same handling as as workaround.
Changed paths:
engines/kyra/script/script_lok.cpp
diff --git a/engines/kyra/script/script_lok.cpp b/engines/kyra/script/script_lok.cpp
index 325ee67..2efa159 100644
--- a/engines/kyra/script/script_lok.cpp
+++ b/engines/kyra/script/script_lok.cpp
@@ -362,6 +362,19 @@ int KyraEngine_LoK::o1_forceBrandonToNormal(EMCState *script) {
int KyraEngine_LoK::o1_poisonDeathNow(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_poisonDeathNow(%p) ()", (const void *)script);
seq_poisonDeathNow(1);
+
+ // WORKAROUND for the poison animation after drinking the green potion
+ // that can be made at the alchemists' crystals.
+ // The next animator update from inside delay() after completing the
+ // poison animation would cause invalid memory access (tryin to draw the
+ // already freed special anim shape 142).
+ // I can definitely confirm that for the FM-TOWNS version. I don't know
+ // about the DOS-CD version. Maybe this has been fixed there somehow.
+ // I simply repeat the same steps that are done after the potion animation
+ // when bitten by the snake (scene_lok.cpp, lines 964, 966).
+ _characterList[0].currentAnimFrame = 7;
+ _animator->animRefreshNPC(0);
+
return 0;
}
More information about the Scummvm-git-logs
mailing list