Skip to content

Commit

Permalink
Merge pull request #36443 from hexagonrecursion/patch-2
Browse files Browse the repository at this point in the history
Do not set head_scaling and torso_scaling to NaN or Inf
  • Loading branch information
ZhilkinSerg authored Dec 26, 2019
2 parents 9286328 + ffd868b commit 2581c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,7 @@ void heal_actor::load( const JsonObject &obj )
torso_power = obj.get_float( "torso_power", 1.5f * limb_power );

limb_scaling = obj.get_float( "limb_scaling", 0.25f * limb_power );
float scaling_ratio = limb_scaling / limb_power;
float scaling_ratio = limb_power < 0.0001f ? 0.0f : limb_scaling / limb_power;
head_scaling = obj.get_float( "head_scaling", scaling_ratio * head_power );
torso_scaling = obj.get_float( "torso_scaling", scaling_ratio * torso_power );

Expand Down

0 comments on commit 2581c93

Please sign in to comment.