Complete.Org: Mailing Lists: Archives: freeciv-ai: March 2005:
[freeciv-ai] Re: (PR#12422) stupid AI leaves its city in disorder
Home

[freeciv-ai] Re: (PR#12422) stupid AI leaves its city in disorder

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [freeciv-ai] Re: (PR#12422) stupid AI leaves its city in disorder
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Mar 2005 14:42:19 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12422 >

Benoit Hudson wrote:

> cm_query_result should never be clobbering the city; I had noted that
> your patch was buggy in #11415 and offered a patch but probably you
> didn't see it since apparently the bug was already marked closed.

You can argue that the current behavior (where cm_query_result calls 
generic_city_refresh before "saving" the city value) is buggy.  But you 
can also argue that any other behavior is also buggy.  If the query is 
passed in an un-refreshed city it must do a full refresh of the city 
before beginning any calculations.  This refresh doesn't have to be 
"saved" (we could restore the old value afterwards) but then we have the 
problem that the unrefreshed city is just passed on to the next caller 
(again a bug).  The only real "solution" that doesn't have 
cm_query_result ever clobber the city is to *require* that all cities be 
passed in refreshed.

-jason





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