Skip to content

Commit

Permalink
missed a spot
Browse files Browse the repository at this point in the history
  • Loading branch information
NickAragua committed May 10, 2021
1 parent 09d5824 commit 44af08f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2301,8 +2302,14 @@ private static void deployArtilleryOffBoard(List<Entity> entityList) {
*/
private static void setStartingAltitude(List<Entity> 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);
Expand Down

0 comments on commit 44af08f

Please sign in to comment.