setEjectEnabled ( (!isInfantry) && ce.isActive());
setEjectEnabled ( (!isInfantry) && !(isMech && ((Mech)ce).getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) && ce.isActive());
    private void updateButtons() {        final Entity ce = ce();        boolean isMech      = (ce instanceof Mech);        boolean isInfantry  = (ce instanceof Infantry);        boolean isProtomech = (ce instanceof Protomech);        boolean isVTOL      = (ce instanceof VTOL);        // ^-- I suppose these should really be methods, a-la Entity.canCharge(), Entity.canDFA()...                setWalkEnabled(!ce.isImmobile() && ce.getWalkMP() > 0 && !ce.isStuck());        setJumpEnabled(!ce.isImmobile() && ce.getJumpMP() > 0 && !ce.isStuck());        setBackUpEnabled(butWalk.isEnabled());        setChargeEnabled(ce.canCharge());        setDFAEnabled(ce.canDFA());        if ( isInfantry || isProtomech ) {            if(client.game.containsMinefield(ce.getPosition())) {                setClearEnabled(true);            } else {                setClearEnabled(false);            }        } else {            setClearEnabled(false);        }                if(ce.getMovementMode() == IEntityMovementMode.HYDROFOIL                || ce.getMovementMode() == IEntityMovementMode.NAVAL                || ce.getMovementMode() == IEntityMovementMode.SUBMARINE                || ce.getMovementMode() == IEntityMovementMode.VTOL) {            butClimbMode.setEnabled(false);        } else {            butClimbMode.setEnabled(true);        }        setTurnEnabled(!ce.isImmobile() &&                 !ce.isStuck() &&                (ce.getWalkMP() > 0 || ce.getJumpMP() > 0));        if (ce.isProne()) {            setGetUpEnabled(!ce.isImmobile() && !ce.isStuck());            setGoProneEnabled(false);            setHullDownEnabled(false);        } else if(ce.isHullDown()) {            setGetUpEnabled(!ce.isImmobile() && !ce.isStuck());            setGoProneEnabled(!ce.isImmobile() && isMech && !ce.isStuck());            setHullDownEnabled(false);        } else {            setGetUpEnabled(false);            setGoProneEnabled(!ce.isImmobile() && isMech && !ce.isStuck());            setHullDownEnabled(ce.canGoHullDown());        }        updateProneButtons();        updateRACButton();        updateSearchlightButton();        updateLoadButtons();        updateElevationButtons();                setLayMineEnabled(ce.canLayMine());        setFleeEnabled(ce.canFlee());        if (client.game.getOptions().booleanOption("vehicles_can_eject")) { //$NON-NLS-1$            setEjectEnabled ( (!isInfantry) && ce.isActive());        } else {            setEjectEnabled(isMech && ce.isActive());        }            }