Skip to content

Commit

Permalink
Fix Division through zero with Longbow with low weight arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 19, 2014
1 parent cb33bb1 commit 1c1ae28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/weaponry/weapons/LongBow.java
Expand Up @@ -51,7 +51,7 @@ protected Entity createProjectile(ItemStack arrows, World world, EntityPlayer pl
float weight = tags.getFloat("Mass");

// we need heavier arrows because we have POW. therefore we increase the weight penality on accuracy
accuracy += ((100f-matAccuracy)/10f)/(weight-1f);
accuracy += ((100f-matAccuracy)/10f)/Math.max(1f, weight-1f);
if(accuracy < 0)
accuracy = 0;
}
Expand Down

0 comments on commit 1c1ae28

Please sign in to comment.