1
0

Fixed a warning.

This commit is contained in:
madmaxoft 2014-03-14 14:36:44 +01:00
parent 1259844084
commit 35fe96b07d

View File

@ -2453,14 +2453,14 @@ cPlayer * cWorld::FindClosestPlayer(const Vector3d & a_Pos, float a_SightLimit,
{ {
cTracer LineOfSight(this); cTracer LineOfSight(this);
float ClosestDistance = a_SightLimit; double ClosestDistance = a_SightLimit;
cPlayer * ClosestPlayer = NULL; cPlayer * ClosestPlayer = NULL;
cCSLock Lock(m_CSPlayers); cCSLock Lock(m_CSPlayers);
for (cPlayerList::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) for (cPlayerList::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{ {
Vector3f Pos = (*itr)->GetPosition(); Vector3f Pos = (*itr)->GetPosition();
float Distance = (Pos - a_Pos).Length(); double Distance = (Pos - a_Pos).Length();
if (Distance < ClosestDistance) if (Distance < ClosestDistance)
{ {