Remove unused checkWaypoint function

It was an almost exact copy of the checkPathCompleted function anyway.
openmw-35
scrawl 10 years ago
parent 4d9100091d
commit a17252eab3

@ -580,7 +580,7 @@ namespace MWMechanics
buildNewPath(actor, target); //may fail to build a path, check before use
//delete visited path node
mPathFinder.checkWaypoint(pos.pos[0],pos.pos[1],pos.pos[2]);
mPathFinder.checkPathCompleted(pos.pos[0],pos.pos[1],pos.pos[2]);
// This works on the borders between the path grid and areas with no waypoints.
if(inLOS && mPathFinder.getPath().size() > 1)

@ -282,21 +282,6 @@ namespace MWMechanics
return Ogre::Math::ATan2(directionX,directionY).valueDegrees();
}
bool PathFinder::checkWaypoint(float x, float y, float z)
{
if(mPath.empty())
return true;
ESM::Pathgrid::Point nextPoint = *mPath.begin();
if(sqrDistanceZCorrected(nextPoint, x, y, z) < 64*64)
{
mPath.pop_front();
if(mPath.empty()) mIsPathConstructed = false;
return true;
}
return false;
}
bool PathFinder::checkPathCompleted(float x, float y, float z, float tolerance)
{
if(mPath.empty())

@ -42,9 +42,6 @@ namespace MWMechanics
bool checkPathCompleted(float x, float y, float z, float tolerance=32.f);
///< \Returns true if we are within \a tolerance units of the last path point.
bool checkWaypoint(float x, float y, float z);
///< \Returns true if a way point was reached
float getZAngleToNext(float x, float y) const;
bool isPathConstructed() const

Loading…
Cancel
Save