Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Wonder obsolesence across games (PR#1434)
Home

[Freeciv-Dev] Wonder obsolesence across games (PR#1434)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Wonder obsolesence across games (PR#1434)
From: dspeyer@xxxxxxxxxxxxxxxxxxxxx
Date: Sat, 4 May 2002 12:53:28 -0700 (PDT)

Full_Name: Daniel Speyer
Version: latest CVS
Distribution: Built from source
Client: Both (or N/A)
OS: Debian GNU/Linux
Submission from: (NULL) (129.2.159.61)


If you start a game, build Sun Tzu's War Academy, end the game, and start a new
game using the same client, you will be unable to build barracks.  Other
wonders/improvements are presumably similar.

This is because the game.players[0].improvements array is not innitialized for
each game.  Probably the best solution is to put

  for(i=0; i<B_LAST; i++){
    game.players[0].improvements[i]=I_NONE;
  }

into the game connection routines, probably in try_to_connect
(freeciv/client/clinet.c).  It's a little ugly there, but it works.  I haven't
found another place to put it that works cross-gui.

I'd make a patch, but my clinet.c is pretty modified, and I'm still not sure
where in the function is least aesthetically offensive.



[Prev in Thread] Current Thread [Next in Thread]