diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-23 22:18:01 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-23 22:18:01 +0100 |
commit | 1014c737a4f16ce374fa834822ba173c00cae678 (patch) | |
tree | 8bd9d3cf29a48bf030d3155f93c71fbc8c9cddcc /src/Entities | |
parent | Provides an enhancement to daylight sensors (diff) | |
download | cuberite-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 |
Diffstat (limited to 'src/Entities')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
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(); |