navparser.cpp: fix bugs in findClosestNavSquare
It never used overlapping areas
This commit is contained in:
parent
fbe949a5cd
commit
9f30c9916d
@ -455,11 +455,11 @@ CNavArea *findClosestNavSquare(const Vector &vec)
|
||||
ovBestDist = dist;
|
||||
ovBestSquare = &i;
|
||||
}
|
||||
if (bestSquare)
|
||||
if (!ovBestSquare)
|
||||
ovBestSquare = bestSquare;
|
||||
|
||||
if (isLocal)
|
||||
findClosestNavSquare_localAreas.push_back(bestSquare);
|
||||
findClosestNavSquare_localAreas.push_back(ovBestSquare);
|
||||
|
||||
return ovBestSquare;
|
||||
}
|
||||
|
Reference in New Issue
Block a user