Ticket #3531: 3531 - Fix DISABLE_PATHFINDER option.patch
File 3531 - Fix DISABLE_PATHFINDER option.patch, 1.1 KB (added by , 9 years ago) |
---|
-
source/simulation2/components/CCmpUnitMotion.cpp
41 41 42 42 // For debugging; units will start going straight to the target 43 43 // instead of calling the pathfinder 44 #define DISABLE_ PATHFINDER 044 #define DISABLE_LONGPATHFINDER 0 45 45 46 46 /** 47 47 * When advancing along the long path, and picking a new waypoint to move … … 1313 1313 // We are going to recompute our path, so we will use the most recent passability grid 1314 1314 m_PassabilityMapChangedRecently = false; 1315 1315 1316 #if DISABLE_ PATHFINDER1316 #if DISABLE_LONGPATHFINDER 1317 1317 { 1318 1318 CmpPtr<ICmpPathfinder> cmpPathfinder (GetSimContext(), SYSTEM_ENTITY); 1319 CFixedVector2D goalPos = cmpPathfinder->GetNearestPointOnGoal(from, m_FinalGoal);1319 CFixedVector2D goalPos = m_FinalGoal.NearestPointOnGoal(from); 1320 1320 m_LongPath.m_Waypoints.clear(); 1321 1321 m_ShortPath.m_Waypoints.clear(); 1322 1322 m_ShortPath.m_Waypoints.emplace_back(Waypoint{ goalPos.X, goalPos.Y });