Remove an unused function (it was used by the old pathfinder).

This was SVN commit r17103.
This commit is contained in:
Nicolas Auvray 2015-10-04 18:02:16 +00:00
parent b11b16a99a
commit e0093c8ecc
2 changed files with 0 additions and 39 deletions

View File

@ -986,38 +986,6 @@ void LongPathfinder::ComputeJPSPath(entity_pos_t x0, entity_pos_t z0, const Path
m_DebugGoal = state.goal;
}
void LongPathfinder::ComputePathOffImpassable(entity_pos_t x0, entity_pos_t z0, const PathGoal& UNUSED(origGoal), pass_class_t passClass, WaypointPath& path)
{
u16 i0, j0;
Pathfinding::NearestNavcell(x0, z0, i0, j0, m_GridSize, m_GridSize);
u16 iGoal = i0;
u16 jGoal = j0;
m_PathfinderHier.FindNearestPassableNavcell(iGoal, jGoal, passClass);
int ip = iGoal;
int jp = jGoal;
// Reconstruct the path (in reverse)
while (ip != i0 || jp != j0)
{
entity_pos_t x, z;
Pathfinding::NavcellCenter(ip, jp, x, z);
path.m_Waypoints.emplace_back(Waypoint{ x, z });
// Move diagonally/horizontally/vertically towards the start navcell
if (ip > i0)
ip--;
else if (ip < i0)
ip++;
if (jp > j0)
jp--;
else if (jp < j0)
jp++;
}
}
void LongPathfinder::ImprovePathWaypoints(WaypointPath& path, pass_class_t passClass, entity_pos_t maxDist, entity_pos_t x0, entity_pos_t z0)
{
if (path.m_Waypoints.empty())

View File

@ -284,13 +284,6 @@ private:
// Helper functions for ComputePath
/**
* Same kind of interface as ComputePath, but works when the unit is starting
* on an impassable navcell.
* Returns a path heading directly to the nearest passable navcell, then the goal.
*/
void ComputePathOffImpassable(entity_pos_t x0, entity_pos_t z0, const PathGoal& origGoal, pass_class_t passClass, WaypointPath& path);
/**
* Given a path with an arbitrary collection of waypoints, updates the
* waypoints to be nicer. Calls "Testline" between waypoints