[Freeciv-Dev] Re: (PR#11683) ships causing unhappyness bugs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11683 >
Christian Knoke wrote:
> Look at Osaka: no unhappyness. Then move destroyer currently in Moisakula.
> 1 step SW gives 2 unhappy in Osaka. 1 more step SW gives 4 unhappy in Osaka.
> Note that women's lib wonder is present in Saitama.
This is a crazy crazy error! It happens because the city is refreshed
in the client differently in the server, but only when CMA is activated.
Note that there is one naval unit outside of borders (call this unit A).
This would cause unhappiness but you have the police station effect.
When you move a second naval unit out (unit B), now just one of the
units causes unhappiness. The server does a refresh and calculates this
unhappiness to be of the second unit in its list: unit B. Then it sends
this info to the client and the client runs CMA which does a city
refresh which calculates the unhappiness to be of the second unit in its
(different list): unit A. Thus unit B is marked as having the
unhappiness. Also the CMA is released at this time since the
requirements cannot be satisfied. Then when you move unit B again the
server sends another packet for unit B which reports the information the
server has: that unit B has 2 unhappiness. Thus in the display units A
and B both have 2 unhappiness. This is a purely cosmetic error that can
be corrected by moving unit A (causing a corrective packet to be sent
from the server) or by triggering CMA on the city.
I have no idea how this can be fixed except by moving
generic_city_refresh entirely into the server and/or refusing to
recalculate these upkeep values at the client.