Function FloodPathTracer.CalculateStep

CalculateStep (long targetTick)

Calculates the path until completed or until the time has passed targetTick.

Protected
void CalculateStep (

long

targetTick

)

Calculates the path until completed or until the time has passed targetTick.

Usually a check is only done every 500 nodes if the time has passed targetTick. Time/Ticks are got from System.DateTime.UtcNow.Ticks.

Basic outline of what the function does for the standard path (Pathfinding.ABPath). while the end has not been found and no error has occurred
pop the next node of the heap and set it as current
check if we have reached the end
if so, exit and return the path

open the current node, i.e loop through its neighbours, mark them as visited and put them on a heap

check if there are still nodes left to process (or have we searched the whole graph)
if there are none, flag error and exit

check if the function has exceeded the time limit
if so, return and wait for the function to get called again