[Freeciv-Dev] Re: 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@xxxxxxxxxxx |
Subject: |
[Freeciv-Dev] Re: Patch: Use original city id at client (Fixes some bugs)] |
From: |
Thue <thue@xxxxxxx> |
Date: |
Tue, 21 Nov 2000 13:33:44 +0100 |
And this should have been sent to freeciv-dev, not freeciv...
On Mon, 20 Nov 2000 21:20:56 Thue wrote:
>
> On Tue, 17 Oct 2000 12:05:05 Marko Lindqvist wrote:
> >
> > 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)
>
> The fix to 1. doesn't seem rigth. You could concievably have a city C
> with
> a traderoute to p1. Then the city is transformed to D by being taken by
> another player, but p1 still sees it as C. Then p2 makes a traderoute to
> D.
> Then the city is taken again and becomes E. Now you would need to keep
> the
> ids of both C and D, not just the original ID.
> A better way would be, when sending a city to a client with a traderoute
> to
> a city at x,y , to check the players private map and find the ID of the
> city there, and send that.
>
> -Thue
Similarly you could make the client send the (x,y) of the city they want,
then find what city it is from their private map, and then see if the
player they are trading with have a city at the square. (to solve 2) )
3) should be solveable with some checking, maybe invalidating a treaty if
one of the clauses contains a non-existant city. And of course removing
clauses in the client if a city disappears.
-Thue (who is not in patch-making mood rigth now)
- [Freeciv-Dev] Re: Patch: Use original city id at client (Fixes some bugs), Thue, 2000/11/20
- Message not available
- [Freeciv-Dev] Re: Patch: Use original city id at client (Fixes some bugs)],
Thue <=
- [Freeciv-Dev] Re: Patch: Use original city id at client (Fixes some bugs), Marko Lindqvist, 2000/11/21
- [Freeciv-Dev] Windows COM client, Arlo Belshee, 2000/11/21
- [Freeciv-Dev] Windows COM client, Andreas Kemnade, 2000/11/21
- [Freeciv-Dev] Re: Windows COM client, Arlo Belshee, 2000/11/21
- [Freeciv-Dev] Re: Windows COM client, Thue, 2000/11/21
- [Freeciv-Dev] Re: Windows COM client, Vasco Alexandre Da Silva Costa, 2000/11/21
- [Freeciv-Dev] Re: Windows COM client, Arlo Belshee, 2000/11/21
- [Freeciv-Dev] Re: Windows COM client, Jarda Benkovsky, 2000/11/22
|
|