Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] (PR#7107) Units move before game_advance_year
Home

[Freeciv-Dev] (PR#7107) Units move before game_advance_year

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7107) Units move before game_advance_year
From: "Michael Kirzinger" <mjk3@xxxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2003 11:31:29 -0800
Reply-to: rt@xxxxxxxxxxx

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

I'm not sure if this has been brought up before, but any player
controlled unit set to ai control moves before the turn is advanced.
This is due to the fact that the unit move points are restored and then
are moved for the next turn, during end_turn (in srv_main.c), before the
turn counter is increased.

One problem that this can cause is that cities from huts found by units
on autoexplore/goto receive an incorrect value of one turn earlier for
the turn they are founded.

(semi-off topic: what is the purpose of setting did_buy to true in new
cities? Is it just simply a workaround to this issue so that the server
will not allow units to be bought in new cities where turn_founded is
off by 1?)

I see a couple of ways to possibly fix it:
1) Move sections of end_turn to after game_advance_year.
2) Move game_advance_year to either in, or before end_turn. (I haven't
looked at what effects this could cause for the rest of end_turn).

An example of fix 1 is attached.

-Michael

Attachment: unitactivitieschange.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7107) Units move before game_advance_year, Michael Kirzinger <=