fixed FindNearest() default value to use with squared length's

This commit is contained in:
jeefo 2015-08-03 00:31:37 +03:00
commit 95a02680ca
2 changed files with 2 additions and 2 deletions

View file

@ -1502,7 +1502,7 @@ public:
int GetFacingIndex (void);
int FindFarest (const Vector &origin, float maxDistance = 32.0);
int FindNearest (const Vector &origin, float minDistance = 9999.0, int flags = -1);
int FindNearest (const Vector &origin, float minDistance = 99999999.0f, int flags = -1);
void FindInRadius (Array <int> &radiusHolder, float radius, const Vector &origin, int maxCount = -1);
void Add (int flags, const Vector &waypointOrigin = nullvec);

View file

@ -168,7 +168,7 @@ TacticChoosen:
// force bomber to select closest goal, if round-start goal was reset by something
if (m_hasC4 && g_timeRoundStart + 20.0f < GetWorldTime ())
{
float minDist = 999999.0f;
float minDist = 99999999.0f;
int count = 0;
for (int i = 0; i < g_numWaypoints; i++)