if (entity.OnSameC3NetworkAs(e)) {
if (entity.onSameC3NetworkAs(e)) {
    private void refreshC3() {        choC3.removeAll();        int listIndex = 0;        entityCorrespondance = new int[client.game.getNoOfEntities() + 2];        if(entity.hasC3i()) {            choC3.add("Create new network (6 free)");            if(entity.getC3Master() == null) choC3.select(listIndex);            entityCorrespondance[listIndex++] = entity.getId();        }        else if(entity.hasC3M()) {            int nodes = entity.calculateFreeC3Nodes();            choC3.add("Set as company-level master (" + nodes + " free)");            if(entity.C3MasterIs(entity)) choC3.select(listIndex);            entityCorrespondance[listIndex++] = entity.getId();            choC3.add("Set as independant master (" + nodes + " free)");            if(entity.getC3Master() == null) choC3.select(listIndex);            entityCorrespondance[listIndex++] = -1;        }        for (Enumeration i = client.getEntities(); i.hasMoreElements();) {            final Entity e = (Entity)i.nextElement();            if(!entity.isEnemyOf(e) && !entity.equals(e)) {                int nodes = e.calculateFreeC3Nodes();                if (entity.C3MasterIs(e) && !entity.equals(e)) nodes++;                if(entity.hasC3i() && (entity.OnSameC3NetworkAs(e) || entity.equals(e))) nodes++;                if(entity.hasC3i() != e.hasC3i()) nodes = 0;                if(nodes > 0) {                    if(e.hasC3i()) {                        if (entity.OnSameC3NetworkAs(e)) {                            choC3.add("Join " + e.getDisplayName() + " [netid " + e.getC3NetID() + ": " + (nodes - 1)  + " free]");                            choC3.select(listIndex);                                            }                        else                            choC3.add("Join " + e.getDisplayName() + " (netid " + e.getC3NetID() + ": " + nodes + " free)");                        entityCorrespondance[listIndex++] = e.getId();                    }                    else if (e.C3MasterIs(e) != entity.hasC3M()) {                      // if we're a slave-unit, we can only connect to sub-masters, not main masters                      // likewise, if we're a master unit, we can only connect to main master units, not sub-masters                    }                    else if (entity.C3MasterIs(e)) {                        choC3.add("Connect to " + e.getDisplayName() + " [" + (nodes - 1) + " free]");                        choC3.select(listIndex);                        entityCorrespondance[listIndex++] = e.getId();                    }                    else {                        choC3.add("Connect to " + e.getDisplayName() + " (" + nodes + " free)");                        entityCorrespondance[listIndex++] = e.getId();                    }                }            }        }    }