Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Re: bug + fix: cities lose settlers immediately after bui
Home

[Freeciv-Dev] Re: bug + fix: cities lose settlers immediately after bui

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: bug + fix: cities lose settlers immediately after building them (PR#298)
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Sun, 12 Mar 2000 17:54:41 -0500

At 2000/03/09 18:29 , Reinier Post wrote:
>A long standing, and if I may say so, extremely annoying bug:
>city builds settler, city rearranges workers without regard to the
>settler's own production cost, city loses settler on the next turn.
>
>The attached patch isn't pretty, but it seems to get the job done.
>(Tested on 1 example.)

When I tried this patch on the test file you sent me, it didn't work.  The
"if" didn't fire, because pcity->turn_last_built was not equal to game.year.

(I put the test on
<ftp://ftp.freeciv.org/freeciv/incoming/mombasa.sav.bz2>.  Mombasa is the
city that loses its new settler.)

So, I attempted to fix this problem in a different way (see attached
patch).  This patch causes slightly different behavior when an
unsupportable (because of too little food) unit is built.  The
unsupportable unit is disbanded earlier than in the current implementation.

(The test file demonstrates this in the city of Nairobi.)

I'm not sure why this happens, or if this isn't actually correct behavior.

Attachment: citymindsettler-1.diff
Description: Text document

jjm

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