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

Finally found the logic line that's causing one of the problems:

citytools.c package_dumb_city() line 1377:

   if (ptile->owner) {
     /* Use tile owner information not city owner information. */
     packet->owner = ptile->owner->player_no;
   } else {
     packet->owner = pdcity->owner->player_no;

So, it was really deliberate, not some accident!

The sequence:

  (1) the server, "knowing" that the city is gone, expands the border.

  (2) when updating the player, chooses to send the tile owner, not the
      city owner.

  (3) when the player gets the update, the client thinks it owns the city,
      and adds it to its list of cities.

  (4) although the code no longer crashes, the city still isn't useful --
      no workers, not allowed to place workers, cannot change build -- as
      the server still "knows" the city is owned by somebody else....

Anyway, this shows my solution is on the right track.  The tile will
point to the dummy for owner information; they will always be the same.

Freeciv-dev mailing list

Reply via email to