1
0

Improved player fall particle positions

This commit is contained in:
Tiger Wang 2013-12-23 21:18:01 +00:00
parent 76444470a4
commit 1014c737a4

View File

@ -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();