From c58ed601a2a1b450d5e32106a4e2d64a3926c206 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist <cazfi74@gmail.com> Date: Fri, 26 Mar 2021 08:52:26 +0200 Subject: [PATCH 42/42] Send info about city size reduction to everyone in nuke-specific part of code Osdn #41810 changed generic city_reduce_size() to send city info about the city in question to everyone, instead of doing sync_cities(). Revert that change and instead send the city in question in nuke-specific code. See osdn #41860 Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> --- server/cityturn.c | 2 +- server/unittools.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/cityturn.c b/server/cityturn.c index 5279ca0752..073d767bba 100644 --- a/server/cityturn.c +++ b/server/cityturn.c @@ -815,7 +815,7 @@ bool city_reduce_size(struct city *pcity, citizens pop_loss, auto_arrange_workers(pcity); /* Send city data. */ - send_city_info(NULL, pcity); + sync_cities(); fc_assert_ret_val_msg(0 == loss_remain, TRUE, "city_reduce_size() has remaining" diff --git a/server/unittools.c b/server/unittools.c index 36a4801cf5..b369f5c124 100644 --- a/server/unittools.c +++ b/server/unittools.c @@ -2735,7 +2735,10 @@ static void do_nuke_tile(struct player *pplayer, struct tile *ptile) } pop_loss = (game.info.nuke_pop_loss_pct * city_size_get(pcity)) / 100; - city_reduce_size(pcity, pop_loss, pplayer, "nuke"); + if (city_reduce_size(pcity, pop_loss, pplayer, "nuke")) { + /* Send city size reduction to everyone seeing it */ + send_city_info(NULL, pcity); + } } if (fc_rand(2) == 1) { -- 2.30.2