summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-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();