fix bug player cant nav to far position(work around)
This commit is contained in:
@@ -178,7 +178,9 @@ namespace AutoMove
|
||||
open.Push(m_ptStart, Heuristic(m_ptStart, m_ptGoal));
|
||||
|
||||
int expands = 0;
|
||||
int maxExpand = nMaxExpand > 0 ? nMaxExpand : 200000;
|
||||
//ToDo: need use another method to caculate the value of maxExpand
|
||||
//800000 is a magic number, need to be optimized
|
||||
int maxExpand = nMaxExpand > 0 ? nMaxExpand : 800000;
|
||||
|
||||
while (open.Count > 0 && expands < maxExpand)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user