diff --git a/Assets/PerfectWorld/Scripts/Move/AutoPFImp/AutoMove/CMoveAgent.cs b/Assets/PerfectWorld/Scripts/Move/AutoPFImp/AutoMove/CMoveAgent.cs index 6d6361f27b..cf25f49124 100644 --- a/Assets/PerfectWorld/Scripts/Move/AutoPFImp/AutoMove/CMoveAgent.cs +++ b/Assets/PerfectWorld/Scripts/Move/AutoPFImp/AutoMove/CMoveAgent.cs @@ -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) {