summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-23 22:18:01 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-23 22:18:01 +0100
commit1014c737a4f16ce374fa834822ba173c00cae678 (patch)
tree8bd9d3cf29a48bf030d3155f93c71fbc8c9cddcc
parentProvides an enhancement to daylight sensors (diff)
downloadcuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar.gz
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar.bz2
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar.lz
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar.xz
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.tar.zst
cuberite-1014c737a4f16ce374fa834822ba173c00cae678.zip
-rw-r--r--src/Entities/Player.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 0c133d3fa..26572f39b 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -457,11 +457,8 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
TakeDamage(dtFalling, NULL, Damage, Damage, 0);
}
- GetWorld()->BroadcastSoundParticleEffect(
- 2006,
- (int)GetPosX(), (int)GetPosY() - 1, (int)GetPosZ(),
- Damage // Used as particle effect speed modifier
- );
+ // Apparently, Mojang changed player positions to always be rounded up. Normally, it doesn't affect much, but we need effect positions to be precise, so ceil()
+ GetWorld()->BroadcastSoundParticleEffect(2006, (int)floor(GetPosX()), (int)GetPosY() - 1, (int)floor(GetPosZ()), Damage /* Used as particle effect speed modifier */);
}
m_LastGroundHeight = (float)GetPosY();