From 8286ef88c4f53c7ce399d9c717c8692af6eca401 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 5 Dec 2006 06:25:23 +0000 Subject: [PATCH] Patch to BobbleAnimation (which we don't seem to use anywhere) from nvanderh. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@87 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../com/threerings/media/animation/BobbleAnimation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/media/animation/BobbleAnimation.java b/src/java/com/threerings/media/animation/BobbleAnimation.java index 29085fc1..1a3e45c3 100644 --- a/src/java/com/threerings/media/animation/BobbleAnimation.java +++ b/src/java/com/threerings/media/animation/BobbleAnimation.java @@ -46,8 +46,8 @@ public class BobbleAnimation extends Animation public BobbleAnimation ( Mirage image, int sx, int sy, int rx, int ry, int duration) { - super(new Rectangle(sx - rx, sy - ry, sx + image.getWidth() + rx, - sy + image.getHeight() + ry)); + super(new Rectangle(sx - rx, sy - ry, image.getWidth() + rx, + image.getHeight() + ry)); // save things off _image = image; @@ -74,8 +74,8 @@ public class BobbleAnimation extends Animation // calculate the latest position int dx = RandomUtil.getInt(_rx); int dy = RandomUtil.getInt(_ry); - _x = (_sx + dx) * ((RandomUtil.getInt(2) == 0) ? -1 : 1); - _y = (_sy + dy) * ((RandomUtil.getInt(2) == 0) ? -1 : 1); + _x = _sx + dx * ((RandomUtil.getInt(2) == 0) ? -1 : 1); + _y = _sy + dy * ((RandomUtil.getInt(2) == 0) ? -1 : 1); } // documentation inherited