protected void doSave() {
        state = WAIT_HSOVERALL;
        // to prevent problems with Q's (and others?) not unsaving properly when they've done weird stuff
        if (ship.dockTarget != null) {
            if (!(ship.dockTarget.point.equals(ship.point)) ||
                    (ship.dockTarget != ship.currentQuadrant.getObjectByScanLetter(ship.dockTarget.scanLetter))) {
                ship.dockTarget = null;
                ship.docked = false;
            }
        }
        // to prevent problems when saving while observing a ship
        if (isObserving) {
            ShipQ thisShip = (ShipQ) ship;
            thisShip.observeShip.parent.theObservers.remove(ship.name);
            if (thisShip.observeShip.parent.theObservers.size() == 0) {
                thisShip.observeShip.parent.isObserved = false;
            }

            isObserving = false;
        }

        // to ensure cease fires get cleared if the player docks / saves at an angry base
        if (ship.dockTarget != null && ship.dockTarget.isAttacker(this.ship)) {
            ship.dockTarget.payBalance(this.ship);
        }

        // and make sure that escape pods are restored to their rightful class
        if (ship instanceof ShipEscapePod) {
            ShipEscapePod pod = (ShipEscapePod) ship;
            if (pod.oldShipClass != null && !pod.oldShipClass.equals(""))
                changeShipClass(((ShipEscapePod) ship).oldShipClass);
        }

        // and finally save the ship
        if (!(this instanceof BotPlayer)) dbInt.updateShipRecord(ship);
        thisPlayerSaved = true;
    }