diff options
author | madmaxoft <github@xoft.cz> | 2014-03-14 14:36:44 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-03-14 14:36:44 +0100 |
commit | 35fe96b07d2bccb98eca4681b7fbf45b18009b9c (patch) | |
tree | 1e38dee0fef375073106305ecb6e7e0cb5a28245 /src | |
parent | Merge pull request #793 from xdot/master (diff) | |
download | cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar.gz cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar.bz2 cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar.lz cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar.xz cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.tar.zst cuberite-35fe96b07d2bccb98eca4681b7fbf45b18009b9c.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/World.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/World.cpp b/src/World.cpp index 3d01dc40f..c314a36da 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -2453,14 +2453,14 @@ cPlayer * cWorld::FindClosestPlayer(const Vector3d & a_Pos, float a_SightLimit, { cTracer LineOfSight(this); - float ClosestDistance = a_SightLimit; - cPlayer* ClosestPlayer = NULL; + double ClosestDistance = a_SightLimit; + cPlayer * ClosestPlayer = NULL; cCSLock Lock(m_CSPlayers); for (cPlayerList::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) { Vector3f Pos = (*itr)->GetPosition(); - float Distance = (Pos - a_Pos).Length(); + double Distance = (Pos - a_Pos).Length(); if (Distance < ClosestDistance) { |