diff options
author | Steven Riehl <sriehl@gmail.com> | 2014-10-12 05:36:40 +0200 |
---|---|---|
committer | Steven Riehl <sriehl@gmail.com> | 2014-10-12 05:36:40 +0200 |
commit | 4a257603632c10f491e4c2faa2b297ac63be9dfc (patch) | |
tree | b1f440a9e570316ef93a447abb108cdbf2f35be9 /src/BlockEntities/BeaconEntity.cpp | |
parent | refactor an if block to std::min (diff) | |
download | cuberite-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.cpp | 4 |
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); |