Add a constant with the default value of 10000 and have the pathfinding settings refer to it. Add a preventative method to AyStar when it's initializing, to limit the number of max_search_nodes if left unattended.
This commit is contained in:
@@ -301,4 +301,7 @@ void AyStar::Init(Hash_HashProc hash, uint num_buckets)
|
||||
* When that one gets full it reserves another one, till this number
|
||||
* That is why it can stay this high */
|
||||
this->openlist_queue.Init(102400);
|
||||
|
||||
/* Set a reasonable default limit */
|
||||
this->max_search_nodes = AYSTAR_DEF_MAX_SEARCH_NODES;
|
||||
}
|
||||
|
Reference in New Issue
Block a user