summaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index b88f55dea..292679542 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -2040,6 +2040,11 @@ void ClientEnvironment::step(float dtime)
//f32 tolerance = BS*12; // 3 without damage
f32 tolerance = BS*14; // 5 without damage
f32 factor = 1;
+ const ContentFeatures &f = m_gamedef->ndef()->
+ get(m_map->getNodeNoEx(lplayer->getStandingNodePos()));
+ // Determine fall damage multiplier
+ int addp = itemgroup_get(f.groups, "fall_damage_add_percent");
+ info.speed *= (1.0 + (float)addp/100.0);
if(info.speed > tolerance)
{
f32 damage_f = (info.speed - tolerance)/BS*factor;