Removed special handling that is now confined to Yohoho and its particular

requirements.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3155 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-10-21 02:54:44 +00:00
parent 2359961556
commit 5939e8fd02
10 changed files with 16 additions and 388 deletions
@@ -1,5 +1,5 @@
//
// $Id: DropSprite.java,v 1.3 2004/08/27 02:20:29 mdb Exp $
// $Id: DropSprite.java,v 1.4 2004/10/21 02:54:44 mdb Exp $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -32,6 +32,8 @@ import com.threerings.util.DirectionUtil;
import com.threerings.media.image.Mirage;
import com.threerings.media.sprite.Sprite;
import com.threerings.puzzle.Log;
/**
* The drop sprite is a sprite that displays one or more pieces falling
* toward the bottom of the board.
@@ -406,9 +408,6 @@ public class DropSprite extends Sprite
pmop = new PieceMovedOp(this, timestamp, _col, _row);
}
// Log.info("Drop sprite tick [dist=" + _dist + ", pctdone=" + pctdone +
// ", row=" + _row + ", col=" + _col + "].");
// constrain the sprite's position to the destination row
pctdone = Math.min(pctdone, 1.0f);
@@ -416,6 +415,10 @@ public class DropSprite extends Sprite
int nx = _srcPos.x + (int)((_destPos.x - _srcPos.x) * pctdone);
int ny = _srcPos.y + (int)((_destPos.y - _srcPos.y) * pctdone);
// Log.info("Drop sprite tick [dist=" + _dist + ", pctdone=" + pctdone +
// ", row=" + _row + ", col=" + _col +
// ", nx=" + nx + ", ny=" + ny + "].");
// only update the sprite's location if it actually moved
if (_ox != nx || _oy != ny) {
setLocation(nx, ny);