diff --git a/src/java/com/threerings/miso/client/TilePath.java b/src/java/com/threerings/miso/client/TilePath.java index 212af67bb..51dccc461 100644 --- a/src/java/com/threerings/miso/client/TilePath.java +++ b/src/java/com/threerings/miso/client/TilePath.java @@ -1,5 +1,5 @@ // -// $Id: TilePath.java,v 1.6 2002/06/12 07:01:29 ray Exp $ +// $Id: TilePath.java,v 1.7 2002/06/12 23:31:42 ray Exp $ package com.threerings.miso.scene; @@ -50,9 +50,7 @@ public class TilePath extends LineSegmentPath { boolean moved = super.tick(pable, timestamp); - if (moved && (_dest instanceof TilePathNode)) { - TilePathNode dest = (TilePathNode) _dest; - + if (moved) { MisoCharacterSprite mcs = (MisoCharacterSprite)pable; int sx = mcs.getX(), sy = mcs.getY(); Point pos = new Point(); @@ -65,7 +63,7 @@ public class TilePath extends LineSegmentPath // if the sprite has reached the destination tile, // update the sprite's tile location and remember // we've arrived - int dtx = dest.getTileX(), dty = dest.getTileY(); + int dtx = _dest.getTileX(), dty = _dest.getTileY(); if (pos.x == dtx && pos.y == dty) { mcs.setTileLocation(dtx, dty); // Log.info("Sprite arrived [dtx=" + dtx + @@ -92,7 +90,7 @@ public class TilePath extends LineSegmentPath protected PathNode getNextNode () { // upgrade the path node to a tile path node - _dest = super.getNextNode(); + _dest = (TilePathNode)super.getNextNode(); // note that we've not yet arrived at the destination tile _arrived = false; @@ -185,7 +183,7 @@ public class TilePath extends LineSegmentPath protected boolean _arrived; /** The destination tile path node. */ - protected PathNode _dest; + protected TilePathNode _dest; /** The iso scene view model. */ protected IsoSceneViewModel _model;