SERVER: Slight fall damage fixes

This commit is contained in:
cypress 2023-07-17 16:52:58 -04:00
parent 5e1bcb46da
commit b416568c7c

View file

@ -2158,15 +2158,12 @@ void() CheckPlayer =
self.dive = 0; self.dive = 0;
} }
if (fabs(vlen(self.oldz - self.origin_z)) > 176 && !(self.perks & P_FLOP)) { if (fabs(self.oldz - self.origin_z) + 64 > 176 && !(self.perks & P_FLOP)) {
float height = fabs(vlen(self.oldz - self.origin_z)) - 176 + 64; float height = fabs(self.oldz - self.origin_z) + 64;
float damage; float damage = height*(0.68);
if (damage > 98) damage = 98;
if (height > 326) {
damage = 98;
} else {
damage = height*(0.68);
}
DamageHandler (self, other, damage, S_ZOMBIE); DamageHandler (self, other, damage, S_ZOMBIE);
if (self.health <= 10) if (self.health <= 10)