this.entityUpdate(entity.getId());
entityUpdate(entity.getId());
    private void resetEntityPhase(int phase) {        // first, mark doomed entities as destroyed and flag them        Vector toRemove = new Vector(0, 10);        for (Enumeration e = game.getEntities(); e.hasMoreElements();) {            final Entity entity = (Entity)e.nextElement();            if (entity.crew.isDoomed()) {                entity.crew.setDead(true);                entity.setDestroyed(true);            }            if (entity.isDoomed()) {                entity.setDestroyed(true);                // Is this unit swarming somebody?  Better let go before                //  it's too late.                final int swarmedId = entity.getSwarmTargetId();                if ( Entity.NONE != swarmedId ) {                    final Entity swarmed = game.getEntity( swarmedId );                    swarmed.setSwarmAttackerId( Entity.NONE );                    entity.setSwarmTargetId( Entity.NONE );                    Report r = new Report(5165);                    r.subject = swarmedId;                    r.addDesc(swarmed);                    addReport(r);                    this.entityUpdate( swarmedId );                }            }            if (entity.isDestroyed() || entity.getCrew().isDead()) {                toRemove.addElement(entity);            }        }        // actually remove all flagged entities        for (Enumeration e = toRemove.elements(); e.hasMoreElements();) {            final Entity entity = (Entity)e.nextElement();            int condition = IEntityRemovalConditions.REMOVE_SALVAGEABLE;            if ( !entity.isSalvage() ) {                condition = IEntityRemovalConditions.REMOVE_DEVASTATED;            }            this.entityUpdate(entity.getId());            game.removeEntity(entity.getId(), condition);            send( createRemoveEntityPacket(entity.getId(), condition) );        }        // do some housekeeping on all the remaining        for (Enumeration e = game.getEntities(); e.hasMoreElements();) {            final Entity entity = (Entity)e.nextElement();            entity.applyDamage();            entity.reloadEmptyWeapons();            // reset damage this phase            entity.damageThisPhase = 0;            entity.engineHitsThisRound = 0;            entity.rolledForEngineExplosion = false;            entity.dodging = false;            // reset done to false            if ( phase == IGame.PHASE_DEPLOYMENT ) {                entity.setDone(!entity.shouldDeploy(game.getRoundCount()));            } else {                entity.setDone(false);            }                        // reset spotlights            entity.setIlluminated(false);            entity.setUsedSearchlight(false);        }    }