Skip to content

Commit

Permalink
Issue 6273: GUI fix to prevent flak from making aimed shots on immobi…
Browse files Browse the repository at this point in the history
…le targets
  • Loading branch information
psikomonkie committed Dec 20, 2024
1 parent 8ad58dc commit 317b175
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -4427,7 +4427,11 @@ else if ((atype != null)
if ((null != te) && !te.isAirborne() && !te.isSpaceborne() && (te instanceof Dropship)) {
immobileMod = new ToHitData(-4, Messages.getString("WeaponAttackAction.ImmobileDs"));
} else {
immobileMod = Compute.getImmobileMod(target, aimingAt, aimingMode);
if(Compute.allowAimedShotWith(weapon, aimingMode)) {
immobileMod = Compute.getImmobileMod(target, aimingAt, aimingMode);
} else {
immobileMod = Compute.getImmobileMod(target, aimingAt, AimingMode.NONE);
}
}

if (immobileMod != null) {
Expand Down

0 comments on commit 317b175

Please sign in to comment.