From 8d5ebe9c04d546b13ab464f3925b3530730d23fa Mon Sep 17 00:00:00 2001 From: Sheep-y Date: Fri, 21 Dec 2018 21:58:42 +0800 Subject: [PATCH] Cleanup CurrentHitDirection after table update (improves issue #28). --- AttackImprovementMod/src/modules/HitLocation.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AttackImprovementMod/src/modules/HitLocation.cs b/AttackImprovementMod/src/modules/HitLocation.cs index b0bb113..6ec8349 100644 --- a/AttackImprovementMod/src/modules/HitLocation.cs +++ b/AttackImprovementMod/src/modules/HitLocation.cs @@ -114,8 +114,10 @@ public static void RecordHitDirection ( AttackDirection from ) { public static void PrefixMechCalledShot ( ref Dictionary hitTable, ArmorLocation bonusLocation, ref float bonusLocationMultiplier ) { try { bonusLocationMultiplier = FixMultiplier( bonusLocation, bonusLocationMultiplier ); - if ( Settings.CalledShotUseClustering && bonusLocation != ArmorLocation.None && CurrentHitDirection != AttackDirection.None ) + if ( Settings.CalledShotUseClustering && bonusLocation != ArmorLocation.None && CurrentHitDirection != AttackDirection.None ) { hitTable = CombatConstants.GetMechClusterTable( bonusLocation, CurrentHitDirection ); + CurrentHitDirection = AttackDirection.None; + } } catch ( Exception ex ) { Error( ex ); } } private static int head;