From 15eebcadce1208ba3d0b71a40b7a1509ded950e6 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 18 Jul 2022 05:27:30 +0300 Subject: [PATCH 51/51] Make vision_site.walls an int It was defined boolean despite containing gfx type number See osdn #45063 Signed-off-by: Marko Lindqvist --- common/vision.h | 2 +- server/citytools.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/vision.h b/common/vision.h index 4aa78b60d6..737ac63cb9 100644 --- a/common/vision.h +++ b/common/vision.h @@ -118,7 +118,7 @@ struct vision_site { citizens size; /* city size (0 <= size <= MAX_CITY_SIZE) */ bool occupied; - bool walls; + int walls; bool happy; bool unhappy; int style; diff --git a/server/citytools.c b/server/citytools.c index 2e6f4a34fa..323c23c2fe 100644 --- a/server/citytools.c +++ b/server/citytools.c @@ -2112,7 +2112,7 @@ bool unit_conquer_city(struct unit *punit, struct city *pcity) /************************************************************************//** Which wall gfx city should display? ****************************************************************************/ -static int city_got_citywalls(const struct city *pcity) +static int city_citywalls_gfx(const struct city *pcity) { int walls = get_city_bonus(pcity, EFT_VISIBLE_WALLS); @@ -2133,7 +2133,7 @@ bool send_city_suppression(bool now) /************************************************************************//** This fills out a package from a player's vision_site. ****************************************************************************/ -static void package_dumb_city(struct player* pplayer, struct tile *ptile, +static void package_dumb_city(struct player *pplayer, struct tile *ptile, struct packet_city_short_info *packet) { struct vision_site *pdcity = map_get_player_city(ptile, pplayer); @@ -2584,7 +2584,7 @@ void package_city(struct city *pcity, struct packet_city_info *packet, packet->was_happy = pcity->was_happy; packet->had_famine = pcity->had_famine; - packet->walls = city_got_citywalls(pcity); + packet->walls = city_citywalls_gfx(pcity); packet->style = pcity->style; packet->city_image = get_city_bonus(pcity, EFT_CITY_IMAGE); packet->capital = pcity->capital; @@ -2631,7 +2631,7 @@ bool update_dumb_city(struct player *pplayer, struct city *pcity) /* pcity->client.occupied isn't used at the server, so we go straight to the * unit list to check the occupied status. */ bool occupied = (unit_list_size(pcenter->units) > 0); - bool walls = city_got_citywalls(pcity); + int walls = city_citywalls_gfx(pcity); bool happy = city_happy(pcity); bool unhappy = city_unhappy(pcity); int style = pcity->style; -- 2.35.1