[Freeciv-Dev] (PR#3771) Uproar display of cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[jdorje - Fri Jul 18 21:00:23 2003]:
> Hmm, after a closer look it seems that you should not see the uproar
> information of enemy cities at all in most cases. This information is
> sent only in the full city packet and only by way of telling you about
> each and every citizen. It's up to the client to then calculate the
> city's status.
OK, it turns out this is completely wrong. The current behavior is
correct - there's just a server bug preventing it from being updated
properly.
The current short_city_packet::happy field is actually a "!disorder"
field. This is updated in package_dumb_city (NOT in update_dumb_city as
it should be) [1]. It is sent and received by the network code. And
the client uses it to determine whether to simulate unhappiness for the
city [2].
Further, adding some assertions to send_packet_city_info and
send_packet_short_city reveals that the packets are not being sent to
the wrong people in the normal course of play (the city_info is sent to
non-owners when a spy investigates the city).
[1] http://www.freeciv.org/lxr/source/server/citytools.c#L1332
[2] http://www.freeciv.org/lxr/source/client/packhand.c#L601
jason
[Freeciv-Dev] (PR#3771) Uproar display of cities,
Jason Short <=
|
|