#42967: send_city_info_at_tile() not revealing a city if the tile *is* known beforehand Open Date: 2021-10-02 09:13 Last Update: 2021-10-11 16:36 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/42967 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42967 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-10-11 16:36 Updated by: cazfi Comment: To make the send_city_info_at_tile() clean and consistent, we should stop it from *ever* revealing the tile. So it would send only what player is already marked to know. Callers that rely on revealing the tile should do it themselves, like trade route establishment does after fix #42968. I don't know if there's other such callers. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: Server Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: I'm debugging a problem in a rather old codebase, so this might not be accurate for HEAD. I just want to this written down until I have an opportunity to go through what's the situation in HEAD. send_city_info_at_tile() for player other than city's owner checks if the tile is previously known, and it calls map_show_tile() if not. After that it updates information only if map_is_known_and_seen(). This means that there is no updates when map has been seen in the past (is known), but not at the moment. Meaning that player gets *less* information if s/he knows the tile, than if not. The problem I'm debugging is that establishing foreign trade route should reveal the source city to the owner of the destination city. In the failing case owner of the destination city has before seen the tile where the source city is later established. send_city_info_at_tile() behavior causes the city not to get revealed. This then lead to client crash when trade partner was NULL there. -- 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/42967 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=42967