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:
parent
4d9100091d
commit
a17252eab3
3 changed files with 1 additions and 19 deletions
|
@ -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…
Reference in a new issue