From 5a19ba3dc7da447e361cb2a739c49dfb84c4658a Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 23 Mar 2022 18:28:38 +0200 Subject: [PATCH 15/15] broadcast_city_info(): Send info to all players, not to owner multiple times Info was being sent to owner once for each other player that could see city internals, also when the info was not meant to be sent to owner at all. It was not sent to those other players who it was meant to. Reported by Lexxie See osdn #44158 Signed-off-by: Marko Lindqvist --- server/citytools.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/citytools.c b/server/citytools.c index 3e66a3497f..f5cd9d36cf 100644 --- a/server/citytools.c +++ b/server/citytools.c @@ -2134,11 +2134,11 @@ void broadcast_city_info(struct city *pcity) players_iterate(pplayer) { if (can_player_see_city_internals(pplayer, pcity)) { if (!send_city_suppressed || pplayer != powner) { - update_dumb_city(powner, pcity); - lsend_packet_city_info(powner->connections, &packet, FALSE); - web_lsend_packet(city_info_addition, powner->connections, &web_packet, FALSE); + update_dumb_city(pplayer, pcity); + lsend_packet_city_info(pplayer->connections, &packet, FALSE); + web_lsend_packet(city_info_addition, pplayer->connections, &web_packet, FALSE); traderoute_packet_list_iterate(routes, route_packet) { - lsend_packet_traderoute_info(powner->connections, route_packet); + lsend_packet_traderoute_info(pplayer->connections, route_packet); } traderoute_packet_list_iterate_end; } } else { -- 2.35.1