ID:29850
 
On a somewhat related topic I got around to updating my pathfinder library implementing a few suggestions made by Iain. This version should help significantly speed up cases in which you don't want any long paths generated in favor of speed.

The maxnodedepth lets you specify the max length of the path and if you set a minnodedist proc you'll be able to eliminate testing of a huge number of nodes.

However one thing to be aware of is that even though you may get a path it may not be the "shortest". For instance if you let your characters wade through lava and you're on one side of a lava river, the destination is on the other and a bridge is a good distance away. If you set the maxnodedepth to a small value your path will go straight through the river ignoring the bridge in the distance if it takes too many nodes to use even though according to the dist proc passed in it may be shorter to use the bridge due to the high weights of the lava tiles.

http://developer.byond.com/hub/Theodis/Pathfinder
This update alone is more impressive and useful than my entire dmp suite. Shall I name a kingdom in one of my projects "Theodosia", or how about "Theosia"?
Is it me, or does your pathfinding library, when given a destination that can be accessed in one "step", always take the most direct path, regardless of the "Distance" weight for it?

I've get a scenario, where any point in the game can be accessed directly, but the further it is the longer it takes to get there. While if you jump from point to point, you'll get there faster, and for the life of me I can't make the pathfinding library do anything but jump directly to the destination.
Actually yeah it does :P. Didn't think of that but when checking for the adjacent nodes it also checks to see if one of the tiles is the end rather than putting it on the queue and preforming the check after dequeueing it. Alright I'll get to fixing it. Thanks for the find :).