Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: (PR#13437) city-transfer bug: I can still look at my o
Home

[Freeciv-Dev] Re: (PR#13437) city-transfer bug: I can still look at my o

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: benoithudson+freeciv@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13437) city-transfer bug: I can still look at my old city
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Jul 2005 19:02:20 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Jason Short wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13437 >
> 
> I wonder if any bugs of this type are due to is-info problems.  There
> are two city packets, the short and long one.  I strongly suspect that
> in 2.0 if a player gives you a city and you give it right back, the
> packet for the second transfer won't be sent.

Indeed.

The screenshot
[http://bugs.freeciv.org/Ticket/Attachment/100018/64526/error.png] shows
the problem ("we" just gave Eldalonde away  - fog is updated but the
client still thinks we own the city).  The attached patch fixes it
(untested).  This is for 2.0 (the "death to is-info" patch already fixed
this in the dev version, just a few days ago).

Benoit, could this be the cause of the error you're seeing?  AFAICT this
could only happen if a city was transferred and then transferred back so
that the two short-city packets sent out were identical (or so that the
two long-city packets were identical - but that's unlikely).

-jason

Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.55.2.4
diff -p -u -r1.55.2.4 packets.def
--- common/packets.def  3 May 2005 03:21:24 -0000       1.55.2.4
+++ common/packets.def  22 Jul 2005 01:58:29 -0000
@@ -389,7 +389,7 @@ PACKET_CITY_REMOVE=20;sc,dsend,lsend
   CITY city_id;
 end
 
-PACKET_CITY_INFO=21; is-info,sc,lsend
+PACKET_CITY_INFO=21; sc,lsend
   CITY id; key
   PLAYER owner;
   COORD x,y;
@@ -433,7 +433,7 @@ PACKET_CITY_INFO=21; is-info,sc,lsend
   TURN turn_founded;
 end
 
-PACKET_CITY_SHORT_INFO=22; is-info,sc,lsend
+PACKET_CITY_SHORT_INFO=22; sc,lsend
   CITY id;key
   PLAYER owner;
   COORD x;

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