From 6618346e7897a8a52d249c84d22a1012843fc2e9 Mon Sep 17 00:00:00 2001 From: psikomonkie <189469115+psikomonkie@users.noreply.github.com> Date: Sat, 14 Dec 2024 14:32:28 -0500 Subject: [PATCH] Issue 1437: During Deployment don't allow grounded aeros to be deployed on top of units --- megamek/src/megamek/common/Compute.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/megamek/src/megamek/common/Compute.java b/megamek/src/megamek/common/Compute.java index 7688c8eeba3..27477a7316d 100644 --- a/megamek/src/megamek/common/Compute.java +++ b/megamek/src/megamek/common/Compute.java @@ -22,6 +22,7 @@ import megamek.common.annotations.Nullable; import megamek.common.enums.AimingMode; import megamek.common.enums.BasementType; +import megamek.common.enums.GamePhase; import megamek.common.equipment.AmmoMounted; import megamek.common.equipment.WeaponMounted; import megamek.common.options.OptionsConstants; @@ -419,8 +420,8 @@ public static Entity stackingViolation(Game game, Entity entering, return null; } - // no stacking violations for flying aeros - if (entering.isAirborne()) { + // no stacking violations for flying aeros, except during deployment - no crushing units during deployment! + if (entering.isAirborne() && !((game.getPhase().equals(GamePhase.DEPLOYMENT) && elevation == 0))) { return null; }