summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-10-17 21:04:49 +0200
committerMattes D <github@xoft.cz>2015-10-31 14:26:24 +0100
commit5ae19fb332ff52c606a632596e29320c26664b4c (patch)
tree0d4456d5b72ce8bb3594c62b592cb88901d16dc2 /src
parentMerge pull request #2581 from bibo38/clangfix (diff)
downloadcuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar.gz
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar.bz2
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar.lz
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar.xz
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.tar.zst
cuberite-5ae19fb332ff52c606a632596e29320c26664b4c.zip
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 57bf382d4..bc8a0db51 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -465,7 +465,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
!IsSwimming() && !IsFlying() &&
(
(
- ((GetPosY() >= 1) && ((GetPosY() - POSY_TOINT) <= EPS)) &&
+ ((GetPosY() >= 1) && (GetPosY() <= 255) && ((GetPosY() - POSY_TOINT) <= EPS)) &&
(
cBlockInfo::IsSolid(GetWorld()->GetBlock((GetPosition() + Vector3d(0, -1, 0)).Floor())) ||
cBlockInfo::IsSolid(GetWorld()->GetBlock((GetPosition() + Vector3d(HalfWidth, -1, 0)).Floor())) ||
@@ -475,7 +475,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
)
) ||
(
- ((GetPosY() >= POSY_TOINT) && ((GetPosY() - (POSY_TOINT + 0.5)) <= EPS)) &&
+ (((GetPosY() >= 1) && (GetPosY() <= 255) && GetPosY() >= POSY_TOINT) && ((GetPosY() - (POSY_TOINT + 0.5)) <= EPS)) &&
(
cBlockSlabHandler::IsAnySlabType(GetWorld()->GetBlock((GetPosition() + Vector3d(0, 0, 0)).Floor())) ||
cBlockSlabHandler::IsAnySlabType(GetWorld()->GetBlock((GetPosition() + Vector3d(HalfWidth, 0, 0)).Floor())) ||
@@ -485,7 +485,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
)
) ||
(
- (fmod(GetPosY(), 0.125) <= EPS) &&
+ ((GetPosY() >= 1) && (GetPosY() <= 255) && fmod(GetPosY(), 0.125) <= EPS) &&
(
(GetWorld()->GetBlock((GetPosition() + Vector3d(0, 0, 0)).Floor()) == E_BLOCK_SNOW) ||
(GetWorld()->GetBlock((GetPosition() + Vector3d(HalfWidth, 0, 0)).Floor()) == E_BLOCK_SNOW) ||