Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2000:
[Freeciv-Dev] Patch: Use original city id at client (Fixes some bugs)
Home

[Freeciv-Dev] Patch: Use original city id at client (Fixes some bugs)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Patch: Use original city id at client (Fixes some bugs)
From: Marko Lindqvist <caz@xxxxxxxxx>
Date: Tue, 17 Oct 2000 13:05:05 +0300 (EET DST)

 Always use original city id at client side instead of one currently used
internally at server (changes when citychanges owner). This way all
clients (and server with some mapping between original id and internal id)
always have same id for cities.

 This fix following known problems:

 1. Client reports traderoute to end up in unknown city when city in fact
    is known.

 2. When adding clause 'You give me city of foobar', other players client
    segfaults if (s)he have already lost that city. (Problem still arise,
    if city is completely destroyed)

 3. If city changes owner, while its already part of treaty, accepting
    treaty segfaults client. (Problem still arise, if city is completely
    destroyed)


---------------------

 Simpler way to fix those bugs would have been to update city id 
everywhere whenever it changes. That would give clients information they
should not know.

 To reproduce mentioned bugs:

 1. City A of player 1 have traderoute with city B of player 2. While city
    A is fogged for player 2, player 3 conquers it. Until player 2
    rediscovers city A (with new id), city B is reported to have
    traderoute to 'Unknown' city.

 2. City of player 1 is known to player 2, but currently fogged when
    player 3 conquers it. Players 1 and 2 have meeting and player 2
    demands that city.

 3. This should be quite obvious.


 As mentioned, bugs 2 and 3 are not completely fixed by this patch. I'll
update (and hopefully expand) my treaty -patch series and include complete
fixes there.



 Caz

--

Attachment: city_id_fix.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Patch: Use original city id at client (Fixes some bugs), Marko Lindqvist <=