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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Wonder obsolesence across games (PR#1434)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 May 2002 22:06:48 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, May 04, 2002 at 12:53:28PM -0700, dspeyer@xxxxxxxxxxxxxxxxxxxxx wrote:
> 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.

What about this patch:
Index: client/clinet.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v
retrieving revision 1.69
diff -u -r1.69 clinet.c
--- client/clinet.c     2002/04/09 14:10:09     1.69
+++ client/clinet.c     2002/05/10 16:49:23
@@ -105,6 +105,7 @@
   
   set_client_state(CLIENT_PRE_GAME_STATE);
   agents_disconnect();
+  game_init();
 }
 
 /**************************************************************************

It is certainly correct ;) but may introduce other problems.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 A life? Cool! Where can I download one?


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