allowAim = ((Entity) target).equals(lockedTarget);
allowAim = target.equals(lockedTarget);
        public void setAimingMode() {            boolean allowAim;            // TC against a mech            allowAim = ((target != null) && ce().hasAimModeTargComp() && target instanceof Mech);            if (allowAim) {                if (lockedLocation) {                    allowAim = ((Entity) target).equals(lockedTarget);                    if (allowAim) {                        aimingMode = IAimingModes.AIM_MODE_TARG_COMP;                        return;                    }                } else {                    aimingMode = IAimingModes.AIM_MODE_TARG_COMP;                    return;                }            }            // immobile mech or gun emplacement            allowAim = (target != null &&                    ((target.isImmobile() && target instanceof Mech) ||                    target instanceof GunEmplacement));            if (allowAim) {                aimingMode = IAimingModes.AIM_MODE_IMMOBILE;                return;            }            aimingMode = IAimingModes.AIM_MODE_NONE;        }