mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-03 10:03:49 -04:00
Pathfinding Overhaul - More cleanup.
This commit is contained in:
parent
4838678944
commit
96fdaf7410
@ -28,8 +28,10 @@ namespace
|
|||||||
|
|
||||||
static float sgn(float a)
|
static float sgn(float a)
|
||||||
{
|
{
|
||||||
if(a > 0) return 1.0;
|
if(a > 0)
|
||||||
else return -1.0;
|
return 1.0;
|
||||||
|
else
|
||||||
|
return -1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getClosestPoint(const ESM::Pathgrid* grid,float x,float y,float z)
|
int getClosestPoint(const ESM::Pathgrid* grid,float x,float y,float z)
|
||||||
@ -105,6 +107,7 @@ void examine_vertex(PointID u, const PathGridGraph g)
|
|||||||
if(u == mGoal)
|
if(u == mGoal)
|
||||||
throw found_path();
|
throw found_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PointID mGoal;
|
PointID mGoal;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user