Fun bug showed up last night, first time in the five years I've been running Miranda's pathfinding. I was driving a group of tanks around the map when all of a sudden, two of them wouldn't move. I looked in the log and the pathfinding was giving up with "no path to destination" errors. Weird, they were moving fine a second ago and the destination I was clicking on looked fine.
Miranda's map has two types of areas: walkable and unwalkable. Unwalkable areas are cliffs, steep hills and (some day maybe) water. When I dug into it with the debugger I discovered that those two tanks were both on unwalkable areas. Ohhhh. Miranda's pathfinding can't find a path if the start of the path is on an unwalkable area. So how did they get on an unwalkable area? It turns out that the system that steers units away from collisions can steer them slightly onto unwalkable areas, but normally the steering system detects that it has driven off the walkable area and goes back immediately.
This time though, right as the units moved off the walkable area, I told them to move to a different location. When I tell a unit to move, if it is already moving to a destination it stops immediately. These two units unfortunately stopped at the exact moment they were off of the walkable area.
So now Miranda's pathfinder will check to see if the unit is on an unwalkable area and find the closest walkable area and use that as the pathfinding starting point. Since the nearest walkable area should be the one it just drove off of, and the steering system is fine with unwalkable areas, nobody should notice any problem.
We were unable to retrieve our session cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.
You will not be able to post until you resolve this problem.