mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
parent
c0d3804b4f
commit
3b231b85bb
1 changed files with 3 additions and 3 deletions
|
@ -53,13 +53,13 @@ namespace
|
|||
{
|
||||
assert(grid && !grid->mPoints.empty());
|
||||
|
||||
float closestDistanceBetween = distanceSquared(grid->mPoints[0], pos);
|
||||
float closestDistanceReachable = closestDistanceBetween;
|
||||
float closestDistanceBetween = FLT_MAX;
|
||||
float closestDistanceReachable = FLT_MAX;
|
||||
int closestIndex = 0;
|
||||
int closestReachableIndex = 0;
|
||||
// TODO: if this full scan causes performance problems mapping pathgrid
|
||||
// points to a quadtree may help
|
||||
for(unsigned int counter = 1; counter < grid->mPoints.size(); counter++)
|
||||
for(unsigned int counter = 0; counter < grid->mPoints.size(); counter++)
|
||||
{
|
||||
float potentialDistBetween = distanceSquared(grid->mPoints[counter], pos);
|
||||
if (potentialDistBetween < closestDistanceReachable)
|
||||
|
|
Loading…
Reference in a new issue