aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script/script_lok.cpp
diff options
context:
space:
mode:
authorcraigsc2020-01-11 12:08:21 -0800
committercraigsc2020-01-11 12:08:21 -0800
commit3dd4fb16f017a8eab5c6c11fd119a397b457866e (patch)
tree5b80b5c5038d8577c2d674a5a4742b335deca515 /engines/kyra/script/script_lok.cpp
parentf9f81ea9baecb714f26cf1c17a1b0ae58431467b (diff)
parent5893672b80f00fced33c42e63471d68ba47d7dd4 (diff)
downloadscummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.gz
scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.tar.bz2
scummvm-rg350-3dd4fb16f017a8eab5c6c11fd119a397b457866e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'engines/kyra/script/script_lok.cpp')
-rw-r--r--engines/kyra/script/script_lok.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/kyra/script/script_lok.cpp b/engines/kyra/script/script_lok.cpp
index 325ee67c9e..2efa159f0b 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;
}