From 44af08f03a93405636e4a4ffe8dd72a76cdc6cb5 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 May 2021 21:57:47 -0400 Subject: [PATCH] missed a spot --- .../campaign/mission/AtBDynamicScenarioFactory.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java index 2ba4cf3234..74bc2bded8 100644 --- a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java +++ b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java @@ -47,6 +47,7 @@ import megamek.common.Entity; import megamek.common.EntityMovementMode; import megamek.common.EntityWeightClass; +import megamek.common.IAero; import megamek.common.IBomber; import megamek.common.Infantry; import megamek.common.Mech; @@ -2301,8 +2302,14 @@ private static void deployArtilleryOffBoard(List entityList) { */ private static void setStartingAltitude(List entityList, int startingAltitude) { for (Entity entity : entityList) { - if (!entity.hasETypeFlag(Entity.ETYPE_VTOL)) { + if (entity instanceof IAero) { entity.setAltitude(startingAltitude); + + // there's a lot of stuff that happens whan an aerospace unit + // "lands", so let's make sure it all happens + if (startingAltitude == 0) { + ((IAero) entity).land(); + } } entity.setElevation(startingAltitude);