From 8e98e35b56034c42a150fd5b8adf2a67255b4609 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Mar 2008 14:27:22 +0000 Subject: Fixed bug in o2_setupSceneAnimation. (should fix some lockups) svn-id: r31181 --- engines/kyra/script_v2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines') diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index 81c823947a..6c339fdb16 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -1256,6 +1256,8 @@ int KyraEngine_v2::o2_setupSceneAnimation(ScriptState *script) { const int index = stackPos(0); const uint16 flags = stackPos(1); + restorePage3(); + SceneAnim &anim = _sceneAnims[index]; anim.x = stackPos(2); anim.y = stackPos(3); @@ -1315,6 +1317,11 @@ int KyraEngine_v2::o2_setupSceneAnimation(ScriptState *script) { obj->height = anim.height; obj->width2 = obj->height2 = anim.specialSize; + // be sure we don't have an the object allready in the anim list + // else we get look ups in some places, the original doesn't do this + // though + _animList = deleteAnimListEntry(_animList, obj); + _animList = addToAnimListSorted(_animList, obj); obj->needRefresh = 1; obj->unk8 = 1; -- cgit v1.2.3