From 3fe3a4928349c67b36c05ab15be70c582b516a88 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 14 Sep 2011 22:49:39 +0200 Subject: GOB: Make sure that the evil fish don't drift up/down --- engines/gob/minigames/geisha/evilfish.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engines/gob/minigames/geisha/evilfish.cpp b/engines/gob/minigames/geisha/evilfish.cpp index 592e84a32c..e9503f4aed 100644 --- a/engines/gob/minigames/geisha/evilfish.cpp +++ b/engines/gob/minigames/geisha/evilfish.cpp @@ -94,6 +94,9 @@ void EvilFish::advance() { bool wasLastFrame = lastFrame(); + int16 oldX, oldY; + getPosition(oldX, oldY); + ANIObject::advance(); int16 x, y, width, height; @@ -107,7 +110,7 @@ void EvilFish::advance() { case kStateSwimLeft: if (!_shouldLeave && (x >= _screenWidth - width)) { setAnimation(_animTurnRight); - setPosition(x, y); + setPosition(x, oldY); _state = kStateTurnRight; } @@ -122,7 +125,7 @@ void EvilFish::advance() { case kStateSwimRight: if (!_shouldLeave && (x <= 0)) { setAnimation(_animTurnLeft); - setPosition(x, y); + setPosition(x, oldY); _state = kStateTurnLeft; } -- cgit v1.2.3