// calculate damage from falling if any
float newHeight = GetPosition().y;
if((StartFallingHeight - newHeight) > 15.0f) // more than 15 meters, we gonna break something (increased to 15 meters, as sometimes on downhill we do not detect properly that we are on the ground and don't want to break legacy code)
{
float damageAmount = ((StartFallingHeight - newHeight))*2.0f; // if falling more than 50 meters - dies immediatelly (damage >=100)
damageAmount = R3D_CLAMP(damageAmount, 0.0f, 255.0f);
// send damage to server
PKT_C2S_FallingDamage_s n;
n.damage = (BYTE)damageAmount;
p2pSendToHost(this, &n, sizeof(n));
SoundSys.PlayAndForget(SoundSys.GetEventIDByPath(m_isFemaleHero?"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_F":"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_M"), GetPosition());
}