From 6229db8175db5af94ff4fad709badb0e75543bdf Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Fri, 27 Mar 2020 00:01:06 -0700 Subject: [PATCH] Fall damage uses engine damage if below 110 --- _zm_reimagined.gsc | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/_zm_reimagined.gsc b/_zm_reimagined.gsc index f486ef59..973c2ff2 100644 --- a/_zm_reimagined.gsc +++ b/_zm_reimagined.gsc @@ -1688,22 +1688,25 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath, ratio = self.maxhealth / 100; idamage = int(idamage / ratio); - min_velocity = 420; - max_velocity = 740; - if (self.divetoprone) - { - min_velocity = 300; - max_velocity = 560; - } - diff_velocity = max_velocity - min_velocity; - velocity = abs(self.fall_velocity); - if (velocity < min_velocity) - { - velocity = min_velocity; - } - // increase fall damage beyond 110 - idamage = int(((velocity - min_velocity) / diff_velocity) * 110); + if (idamage >= 110) + { + min_velocity = 420; + max_velocity = 740; + if (self.divetoprone) + { + min_velocity = 300; + max_velocity = 560; + } + diff_velocity = max_velocity - min_velocity; + velocity = abs(self.fall_velocity); + if (velocity < min_velocity) + { + velocity = min_velocity; + } + + idamage = int(((velocity - min_velocity) / diff_velocity) * 110); + } } return idamage;