Compute from the screen size the longest we will allow our A* paths to

reach while path finding.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3277 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-12-15 03:29:32 +00:00
parent b56061da46
commit cea4f80676
@@ -1,5 +1,5 @@
//
// $Id: MisoScenePanel.java,v 1.63 2004/09/09 00:09:22 ray Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -289,8 +289,8 @@ public class MisoScenePanel extends VirtualMediaPanel
_metrics, sprite.getX(), sprite.getY(), new Point());
Point dest = MisoUtil.screenToTile(_metrics, x, y, new Point());
// TODO: compute this value from the screen size or something
int longestPath = 20;
// compute our longest path from the screen size
int longestPath = 3 * (getWidth() / _metrics.tilewid);
// get a reasonable tile path through the scene
long start = System.currentTimeMillis();