From 0b2c269d8685378a475fe8d80f9380956b86f62f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 18 Nov 2015 01:01:10 +0100 Subject: MADS: Fix posAdjust in Animation::update for v2 games --- engines/mads/animation.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp index d2260dac92..429c5669a9 100644 --- a/engines/mads/animation.cpp +++ b/engines/mads/animation.cpp @@ -466,16 +466,17 @@ void Animation::update() { } bool isV2 = (_vm->getGameID() != GType_RexNebular); - if (!isV2) { + if (isV2 && _canChangeView) { // Handle any offset adjustment for sprites as of this frame // FIXME: This doesn't work properly for Phantom scene 101 bool paChanged = false; - if (scene._posAdjust.x != misc._posAdjust.x) { - scene._posAdjust.x = misc._posAdjust.x; + if (getFramePosAdjust(_currentFrame).x != scene._posAdjust.x) { + scene._posAdjust.x = getFramePosAdjust(_currentFrame).x; paChanged = true; } - if (scene._posAdjust.y != misc._posAdjust.y) { - scene._posAdjust.y = misc._posAdjust.y; + + if (getFramePosAdjust(_currentFrame).y != scene._posAdjust.y) { + scene._posAdjust.y = getFramePosAdjust(_currentFrame).y; paChanged = true; } -- cgit v1.2.3