summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-27 23:17:07 +0100
committerluksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-27 23:17:07 +0100
commit50e87ac9787314a805e08ca623717057869e7348 (patch)
treea6e1f6e52ffb73112ddb60375bec933bf37bae71
parentAdded initial adventure mode support (diff)
downloadcuberite-50e87ac9787314a805e08ca623717057869e7348.tar
cuberite-50e87ac9787314a805e08ca623717057869e7348.tar.gz
cuberite-50e87ac9787314a805e08ca623717057869e7348.tar.bz2
cuberite-50e87ac9787314a805e08ca623717057869e7348.tar.lz
cuberite-50e87ac9787314a805e08ca623717057869e7348.tar.xz
cuberite-50e87ac9787314a805e08ca623717057869e7348.tar.zst
cuberite-50e87ac9787314a805e08ca623717057869e7348.zip
-rw-r--r--source/Player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Player.cpp b/source/Player.cpp
index fea438146..31dc001ca 100644
--- a/source/Player.cpp
+++ b/source/Player.cpp
@@ -274,7 +274,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
if (!m_bTouchGround)
{
- if(m_Pos.y > m_LastJumpHeight) m_LastJumpHeight = m_Pos.y;
+ if(m_Pos.y > m_LastJumpHeight) m_LastJumpHeight = (float)m_Pos.y;
cWorld* World = GetWorld();
char BlockID = World->GetBlock( float2int(m_Pos.x), float2int(m_Pos.y), float2int(m_Pos.z) );
if( BlockID != E_BLOCK_AIR )
@@ -294,7 +294,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
float Dist = (float)(m_LastGroundHeight - m_Pos.y);
int Damage = (int)(Dist - 3.f);
if(m_LastJumpHeight > m_LastGroundHeight) Damage++;
- m_LastJumpHeight = m_Pos.y;
+ m_LastJumpHeight = (float)m_Pos.y;
if (Damage > 0)
{
TakeDamage(Damage, 0);