fix bug player cant nav to far position(work around)

This commit is contained in:
Chomper9981
2026-02-26 11:41:06 +07:00
parent febe5897b8
commit f844b7fdef
@@ -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)
{