Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very
Home

[Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very dangerous
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Dec 2004 15:30:35 -0800
Reply-to: bugs@xxxxxxxxxxx

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

Say you call

   generic_city_refresh(pcity, FALSE, ...)

because you just want a quick refresh.  Then you finish what you're 
doing and call

   generic_city_refresh(pcity, TRUE, ...)

but if nothing has changed in between the two calls then this won't do 
what it looks like it does.  Because the tile_trade isn't changed in the 
second call there will be no recursive call to generic_city_refresh for 
the other cities.  So you end up with unrefreshed cities.

This is actually a major problem.  I don't really see any way around it 
with the current design.  In particular it means that any time you call 
auto_arrange_workers() and the tile_trade is called, none of the cities 
that have trade routes will be updated!  Because the cm code calls 
refresh with FALSE so many times, by the time you get to the final 
city_refresh() call inside auto_arrange_workers, there is nothing left 
to change.

Am I missing something here?

-jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11415) generic_city_refresh(pcity, FALSE, ...) is very dangerous, Jason Short <=