On Tue, 23 Apr 2013 04:19:06 PM Thue Janus Kristensen wrote: > I loaded a save game in the latest freecol git. I could not move > colonists between buildings; the colony is not editable. > > In a new game it works fine. > > The following fixes it. A better fix is probably to find out why players > exist in two copies.
I have not seen any cases where players are duplicated. The real cause here remains unclear. > ------------------- > > --- a/src/net/sf/freecol/client/gui/panel/ColonyPanel.java > +++ b/src/net/sf/freecol/client/gui/panel/ColonyPanel.java > @@ -626,7 +626,7 @@ public final class ColonyPanel extends PortPanel > private void initialize(Colony colony) { > removePropertyChangeListeners(); > setColony(colony); > - editable = colony.getOwner() == getMyPlayer(); > + editable = colony.getOwner().getId().equals(getMyPlayer().getId()); > addPropertyChangeListeners(); > > // Set listeners and transfer handlers > > ------------------------- > > colony.getOwner() is a serverplayer object, while getMyPlayer() > returns a player object. I doubt it. If you are running ColonyPanel code, you are inside the client thread, which does not contain any ServerPlayers. What *might* be happening is that I have stuffed up the client initialization of the user player (as returned by getMyPlayer()) such that it is distinct from all the player/nations. I will investigate further. Cheers, Mike Pope
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers