summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-14 14:46:20 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-14 14:46:20 +0100
commit8b83c1a653fa43ef05c6150126149f4820084097 (patch)
tree4688783dbca9b7a6f0ef662926d07e4c5edc25d6 /src/World.cpp
parentFixed xofts issues (diff)
parentcPlugin:BindConsoleCommand can be called statically. (diff)
downloadcuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar.gz
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar.bz2
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar.lz
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar.xz
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.tar.zst
cuberite-8b83c1a653fa43ef05c6150126149f4820084097.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 8c3a1ff8a..012ba915b 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)
{