prevent fall damage: fix this shit :)

This commit is contained in:
cora 2020-11-17 23:06:52 +01:00
parent f53fa0cbc0
commit 18cadd23ff

View File

@ -287,7 +287,7 @@ void ClientEnvironment::step(float dtime)
if (speed > tolerance && !player_immortal) {
f32 damage_f = (speed - tolerance) / BS * post_factor;
u16 damage = (u16)MYMIN(damage_f + 0.5, U16_MAX);
if (damage != 0) {
if (!g_settings->getBool("prevent_natural_damage") && damage != 0) {
damageLocalPlayer(damage, true);
m_client->getEventManager()->put(
new SimpleTriggerEvent(MtEvent::PLAYER_FALLING_DAMAGE));