1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 03:19:40 +00:00

Remove unused checkWaypoint function

It was an almost exact copy of the checkPathCompleted function anyway.
This commit is contained in:
scrawl 2015-01-06 23:23:58 +01:00
parent 4d9100091d
commit a17252eab3
3 changed files with 1 additions and 19 deletions

View file

@ -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)

View file

@ -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())

View file

@ -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