Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Tech cost patch v6
Home

[Freeciv-Dev] Re: Tech cost patch v6

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Juha Litola <slave@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Tech cost patch v6
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Nov 2001 15:14:12 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Nov 29, 2001 at 03:28:49PM +0200, Juha Litola wrote:
> On Thu, Nov 29, 2001 at 02:11:34PM +0100, Raimar Falke wrote:
> 
> > Problem: where is num_reqs set to 0 (initialized)?
> Hmm, it seems to be 0 when I test it, but maybe it's just good luck.
> 
> > Suggestion: at the correct places (one for the server and one for the 
> > client) do:
> >   for each tech:
> >      tech.num_reqs=0;
> >   for each tech:
> >      num_req_techs(tech)
> > and later doesn't use num_req_techs() anymore.
> Where is the right place in client. In server it could be in
> ruleset.c, but I couldn't find suitable place in client.

Good question. Possible answers:
 - client/packhand.c:handle_ruleset_tech: you have to count the
 received techs OR trust that the server sents them in ascending order
 and catch the last one
 - depending on the game state

I'm not sure what is the correct way. Can anybody help here?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Python is executable pseudocode. Perl is executable line noise"
    -- Bruce Eckel


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