Skip to content

Commit

Permalink
Fixed math error in calcalating remaining damage.
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityMachina committed May 6, 2018
1 parent 9fd4801 commit 28c0bb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified Assemblies/RM_LessHeadInjuries.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions source/mainClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ static void Prefix(Mech __instance, int originalHitLoc, WeaponHitInfo hitInfo, A
{
if (aLoc == ArmorLocation.Head)
{
//copied from main script: we do some quick calculation of damage to see if it's an armor hit or an structure hit
//we do some quick calculation of damage to see if it's an armor hit or an structure hit
float currentArmor = __instance.GetCurrentArmor(aLoc);
float remainingDamage = Mathf.Min(totalDamage, currentArmor);
float remainingDamage = currentArmor - totalDamage;

if (remainingDamage <= 0 && totalDamage < LessHeadInjuries.ArmorHeadHitIgnoreDamageBelow)
{
Expand Down

0 comments on commit 28c0bb6

Please sign in to comment.