From 30db70c3c002fafeb77c44dde0b27378c1eab67e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 18 Jul 2022 05:30:11 +0300 Subject: [PATCH 26/26] 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 f8e90fce23..9ec1d078e2 100644 --- a/common/vision.h +++ b/common/vision.h @@ -121,7 +121,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 465053f5f5..25d130f471 100644 --- a/server/citytools.c +++ b/server/citytools.c @@ -2056,9 +2056,9 @@ bool unit_conquer_city(struct unit *punit, struct city *pcity) } /************************************************************************** - Which wall gfx city should display? + 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); @@ -2533,7 +2533,7 @@ void package_city(struct city *pcity, struct packet_city_info *packet, packet->did_sell = pcity->did_sell; packet->was_happy = pcity->was_happy; - 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); @@ -2570,7 +2570,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