Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#11154) client has unrefreshed cities
Home

[Freeciv-Dev] Re: (PR#11154) client has unrefreshed cities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#11154) client has unrefreshed cities
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 23 Nov 2004 12:15:20 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11154 >

On Tue, 23 Nov 2004, Jason Short wrote:
> > When cm_query_result is called on a city by the *client*, it is
> > sometimes called on an unrefreshed city.In this case
> > pcity->science_bonus == 100, instead of having the correct value.
> > Calling generic_city_refresh at the start of cm_query_result seems to
> > fix it but there should be a better way.
>
> Here's a patch.It's easy enough to add an assertion here to verify
> that this actually does change (among other things) pcity->science_bonus.
>
> This speeds up the CM slightly at the client: 0.7s instead of 0.8s in my
> test.

In the server, cities are always "fresh" (ie whenever something changes,
we refresh before continuing). So the CM should never refresh a city when
it runs in the server, I think.

  - Per





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