From 9552d3330793d48d196c1b07e69638168c776413 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 8 Jun 2018 22:15:43 +0200 Subject: Replaces erlang:ceil by sh_math_util:ceil. So that I can run the server on the dev machines that somehow don't have erlang:ceil. --- src/shared/struct/sh_weapon.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/struct/sh_weapon.erl') diff --git a/src/shared/struct/sh_weapon.erl b/src/shared/struct/sh_weapon.erl index db402af..2cd3fda 100644 --- a/src/shared/struct/sh_weapon.erl +++ b/src/shared/struct/sh_weapon.erl @@ -124,7 +124,7 @@ get_ranges (Wp) -> get_damages (Wp) -> Coef = Wp#weapon.coef, {Min, Max} = damages_of_type(Wp#weapon.range_type, Wp#weapon.damage_mod), - {erlang:ceil(Min * Coef), erlang:ceil(Max * Coef)}. + {sh_math_util:ceil(Min * Coef), sh_math_util:ceil(Max * Coef)}. -spec can_parry (type()) -> boolean(). can_parry (Wp) -> (Wp#weapon.range_type == melee). @@ -397,8 +397,8 @@ apply_to_attributes (Weapon, Attributes) -> DamageModifier = Weapon#weapon.damage_mod, Impact = (20.0 * Weapon#weapon.coef), - FullImpact = erlang:ceil(Impact), - QuarterImpact = erlang:ceil(Impact / 4.0), + FullImpact = sh_math_util:ceil(Impact), + QuarterImpact = sh_math_util:ceil(Impact / 4.0), ResultingDexterity = case RangeModifier of -- cgit v1.2.3-70-g09d2