aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/script_v2.cpp')
-rw-r--r--engines/kyra/script_v2.cpp7
1 files changed, 7 insertions, 0 deletions
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;