Changeset - r7090:3c54fd0b780a
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-06-27 17:05:06
rubidium@openttd.org
(svn r10357) -Fix: and when we're at it... yet another memory leak, but only when you start a new game; can't find any other memory leaks we can fix.
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/npf.cpp
Show inline comments
 
@@ -874,13 +874,19 @@ NPFFoundTargetData NPFRouteToDepotTrialE
 
	}
 
	return best_result;
 
}
 

	
 
void InitializeNPF()
 
{
 
	init_AyStar(&_npf_aystar, NPFHash, NPF_HASH_SIZE);
 
	static bool first_init = true;
 
	if (first_init) {
 
		first_init = false;
 
		init_AyStar(&_npf_aystar, NPFHash, NPF_HASH_SIZE);
 
	} else {
 
		AyStarMain_Clear(&_npf_aystar);
 
	}
 
	_npf_aystar.loops_per_tick = 0;
 
	_npf_aystar.max_path_cost = 0;
 
	//_npf_aystar.max_search_nodes = 0;
 
	/* We will limit the number of nodes for now, until we have a better
 
	 * solution to really fix performance */
 
	_npf_aystar.max_search_nodes = _patches.npf_max_search_nodes;
0 comments (0 inline, 0 general)