/// <summary> /// Clears the destination and all the the associated data. /// </summary> private void ClearDestination() { //MBHEngine.PathFind.HPAStar.NavMesh.DebugCheckNode(mPlannerNavMesh.pStart); WorldManager.pInstance.pCurrentLevel.OnMessage(mGetNavMeshMsg); // If mPlannerNavMesh currently has a destination, that means that we added a temp // node to the nav mesh as that destination, and it needs to be removed now. if (mPlannerNavMesh.pEnd != null) { System.Diagnostics.Debug.Assert(mPlannerNavMesh.pEnd != mPlannerNavMesh.pStart, "End and start are the same."); mGetNavMeshMsg.mNavMesh_Out.RemoveTempNode(mPlannerNavMesh.pEnd); } // Members used to coordinate the low level search need to be reset since the // search had been invalidated. mLowLevelBest = null; mLastHighLevelSearched = null; mPlannerNavMesh.ClearDestination(); mPlannerTileMap.ClearDestination(); //mGetNavMeshMsg.mNavMesh_Out.DebugCheckNodes(); //MBHEngine.PathFind.HPAStar.NavMesh.DebugCheckNode(mPlannerNavMesh.pStart); }