Merge pull request #76 from clintbellanger/master

merge from main project
lazy evaluation A* condition

if the first condition is met, no need to iterate the node list
Weight of diagonal nodes in A* algorithm

Diagonal nodes account for a slightly longer distance than an adjacent
node so calculate the distance correctly. Its already done like this in
the other branch of the same if statement.
Set proper limit for path finding

The exploration limit for path finding was lowered to some guess
depending on the screen size.

Also the hardcoded 1000 in Avatar was removed.

This fixes #658.
Remove obsolete PATH_MAX_TILES definition
MapCollision:compute_path set the default limit parameter to 0

We're dealing with unsigned data types, so better not have -1.
Merge pull request #78 from stefanbeller/pathfinding_performance

merge intelligent pathfinding limit
Target closest node when pathfinding fails

If pathfinding fails to find the destination, target the closest node
that was reached instead.
Fix inconsistency with checking diagonal distance
comment
Combine setPaths() and setDefaultPath()
setPath: Omit the last set for temporary variable as it's unneeded there.
Merge pull request #4 from stefanbeller/lastpathomitvar

setPath: Omit the last set for temporary variable
Merge pull request #667 from dorkster/setpaths

Combine setPaths() and setDefaultPath()
Merge pull request #663 from RyanDansie/pathfinding_optimisation

"Next best" pathfinding results
Reset default path finding limit to 256
Merge pull request #668 from stefanbeller/pathfindinglimit

Reset default path finding limit to 256