summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Riehl <sriehl@gmail.com>2014-10-12 05:36:40 +0200
committerSteven Riehl <sriehl@gmail.com>2014-10-12 05:36:40 +0200
commit4a257603632c10f491e4c2faa2b297ac63be9dfc (patch)
treeb1f440a9e570316ef93a447abb108cdbf2f35be9 /src
parentrefactor an if block to std::min (diff)
downloadcuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar.gz
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar.bz2
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar.lz
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar.xz
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.tar.zst
cuberite-4a257603632c10f491e4c2faa2b297ac63be9dfc.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/BeaconEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp
index c744d12f4..bcd7878a0 100644
--- a/src/BlockEntities/BeaconEntity.cpp
+++ b/src/BlockEntities/BeaconEntity.cpp
@@ -5,7 +5,7 @@
#include "../BlockArea.h"
#include "../Entities/Player.h"
-
+#include <algorithm>
@@ -227,7 +227,7 @@ void cBeaconEntity::GiveEffects(void)
virtual bool Item(cPlayer * a_Player)
{
Vector3d PlayerPosition = Vector3d(a_Player->GetPosition());
- PlayerPosition.y = std::min(m_PosY, static_cast<double>(PlayerPosition.y))
+ PlayerPosition.y = std::min(static_cast<double>(m_PosY), static_cast<double>(PlayerPosition.y));
// TODO: Vanilla minecraft uses an AABB check instead of a radius one
Vector3d BeaconPosition = Vector3d(m_PosX, m_PosY, m_PosZ);