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
Merge pull request #663 from RyanDansie/pathfinding_optimisation

"Next best" pathfinding results