Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Wonder obsolescence / AI tech goals (PR#1490)
Home

[Freeciv-Dev] Re: Wonder obsolescence / AI tech goals (PR#1490)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: Christian Knoke <chrisk@xxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Wonder obsolescence / AI tech goals (PR#1490)
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 May 2002 20:53:03 +0100

On Sun, May 26, 2002 at 02:34:20PM +0200, Raimar Falke wrote:
> On Thu, May 23, 2002 at 10:55:59AM -0700, Christian Knoke wrote:
> > The wonder obsolenscence (now I have looked up this word
> > I can write it twice) is indicated 1 round too late, in
> > the wonder report.
> 
> The attached should fix this (untested).

        update_all_effects() needs to be called whenever anything that
changes building obsolescence or redundancy (or, with the full impr-gen
patch, building effects) itself changes. This includes buildings being
built or destroyed, buildings changing ownership, and changes in
government type and technologies. I thought I'd put suitable calls in
everywhere, but evidently not (it was a long time ago). I think your fix
should work, at least on the server side (but also untested).

> Ben: this call may also be placed in update_research. Any comments?

        Er, I'm not sure what good it would do there. We only need to
update effects when a tech goes to (or from, I suppose, although that
doesn't happen at the moment, AFAIK) the TECH_KNOWN state, and as I
understand it, update_research() deals with the handling of reachable
techs, not discovered ones. It's true that it's called from places in
the code where new techs _might_ have just been discovered, but it looks
like this would burn needless CPU time. Better to keep your current
patch for the server side, IMHO, and apply the attached patch for the
client side...

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"Never was a cornflake girl / Thought that was a good solution"

Attachment: tech-update-client.patch
Description: Text document


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