/** * Helper function that puts the units in the given list at the given altitude, and * VTOLs at the elevation. Use with caution, as may lead to splattering. * @param entityList The entity list to process. * @param startingAltitude Starting altitude. */ private static void setStartingAltitude(List<Entity> entityList, int startingAltitude) { for(Entity entity : entityList) { if(!entity.hasETypeFlag(Entity.ETYPE_VTOL)) { entity.setAltitude(startingAltitude); } entity.setElevation(startingAltitude); } }
for (int i = 0; i < floorNames.size(); i++) { if (input.equals(floorNames.get(i))) { ce().setElevation(floorValues.get(i)); break;
default void land() { ((Entity) this).setMovementMode(EntityMovementMode.WHEELED); ((Entity) this).setAltitude(0); ((Entity) this).setElevation(0); setCurrentVelocity(0); setNextVelocity(0); setOutControl(false); setOutCtrlHeat(false); setRandomMove(false); ((Entity) this).delta_distance = 0; }
if (input != null) { if (input.equals(Messages.getString("DeploymentDisplay.topbridge"))) { ce().setElevation(height); } else { if(ce().isNaval() && (ce().getMovementMode() != EntityMovementMode.SUBMARINE)) { ce().setElevation(0); } else { ce().setElevation(deployhex.floor() - deployhex.surface());
/** * defensively check and correct elevation */ public boolean fixElevation() { if (!isDeployed() || isOffBoard() || !game.getBoard().contains(getPosition())) { return false; } if (!isElevationValid(getElevation(), game.getBoard().getHex(getPosition()))) { System.err.println(getDisplayName() + " in hex " + HexTarget.coordsToId(getPosition()) + " is at invalid elevation: " + getElevation()); setElevation(0 - game.getBoard() .getHex(getPosition()).depth()); System.err.println(" moved to elevation " + getElevation()); return true; } return false; }
entity.setElevation(height);
entity.setElevation(0); entity.setPassedThrough(new Vector<Coords>()); entity.resetFiringArcs();
|| (ce().getMovementMode() == EntityMovementMode.HYDROFOIL) || (ce().getMovementMode() == EntityMovementMode.HOVER)) { ce().setElevation(0); } else if (isVTOL) { ce().setElevation(1); ce().setElevation(Math.max(deployhex.floor() - deployhex.surface(), -2)); } else { ce().setElevation(deployhex.floor() - deployhex.surface());
multiPurposeelevationHack = true; ae.setElevation(0); ae.setElevation(-1);
mpMelevationHack = true; ae.setElevation(0); ae.setElevation(-1);