#45429: Send counter value updates to client Open Date: 2022-08-23 06:37 Last Update: 2022-10-16 00:44 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45429 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45429 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-10-16 00:44 Updated by: lachu Comment: Reply To cazfi Reply To lachu It may require https://osdn.net/projects/freeciv/ticket/45489 . If you prefer, I will rebase it on master. It applies as is. - handle_city_update_counter() needs function header - handle_city_update_counter() should check also against negative 'counter' - It doesn't make much sense to implement sending inside part of the code specific to the one counter we have (updated at turn change). You should probably make a separate (server side) function to update a city counter, which would then take care of sending info to client side too - "if (is_human(pplayer) && NULL != pplayer->current_conn) {" breaks a lot of things, e.g., clients observing AI players, and latter part also global observers - "send_packet_city_update_counter(pplayer->current_conn, &packet);" - send to player's all connections (including observers), not just to controlling connection; use "lsend_...(pplayer->connections...)" - Send the info to global observers too. The "game.glob_observers" should cover them, though most parts of server still(?) do more cumbersome iteration over all connections and sending individually to each of them being a global observer Rebased on master, so it should compile now. I also add per-client update_city_dialog_information/description for future usage (currently, we update only on end of turn, but maybe it should be added). --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: 3.2.0 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Counter values need to be updated also on client side. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45429 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45429