From 57ef6002bfb890134670d666311c7ee1435a9a78 Mon Sep 17 00:00:00 2001 From: cwspain Date: Tue, 26 Sep 2023 13:20:23 -0500 Subject: [PATCH] Don't override called shots (high) for units with partial cover. --- megamek/src/megamek/common/actions/WeaponAttackAction.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/megamek/src/megamek/common/actions/WeaponAttackAction.java b/megamek/src/megamek/common/actions/WeaponAttackAction.java index c66d49330bf..2f67648ec58 100644 --- a/megamek/src/megamek/common/actions/WeaponAttackAction.java +++ b/megamek/src/megamek/common/actions/WeaponAttackAction.java @@ -4399,12 +4399,14 @@ private static ToHitData compileTerrainAndLosToHitMods(Game game, Entity ae, Tar toHit.setCover(LosEffects.COVER_UPPER); } else { if (game.getOptions().booleanOption(OptionsConstants.ADVCOMBAT_TACOPS_PARTIAL_COVER)) { - toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER); toHit.setCover(los.getTargetCover()); } else { - toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER); toHit.setCover(LosEffects.COVER_HORIZONTAL); } + // If this is a called shot (high) the table has already been set and should be used instead of partial cover. + if (toHit.getHitTable() != ToHitData.HIT_ABOVE) { + toHit.setHitTable(ToHitData.HIT_PARTIAL_COVER); + } // Set damageable cover state information toHit.setDamagableCoverTypePrimary(los.getDamagableCoverTypePrimary()); toHit.setCoverLocPrimary(los.getCoverLocPrimary());