From c1db27172140d90a37d774421381c31f3babe3ee Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 13 Oct 2023 01:56:36 +0300 Subject: [PATCH 54/54] Autoworkers: Use ADV_WANTS_EQ() for comparing tile values See osdn #48842 Signed-off-by: Marko Lindqvist --- server/advisors/autoworkers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/advisors/autoworkers.c b/server/advisors/autoworkers.c index a875cabcfe..c8a10a1ff1 100644 --- a/server/advisors/autoworkers.c +++ b/server/advisors/autoworkers.c @@ -335,7 +335,7 @@ static void consider_worker_action(const struct player *pplayer, if (new_tile_value > old_tile_value) { improves = TRUE; - } else if (new_tile_value == old_tile_value && extra > 0) { + } else if (ADV_WANTS_EQ(new_tile_value, old_tile_value) && extra > 0) { improves = TRUE; } else { improves = FALSE; @@ -386,7 +386,7 @@ static void consider_worker_action(const struct player *pplayer, } if (total_value > old_improvement_value - || (total_value == old_improvement_value + || (ADV_WANTS_EQ(total_value, old_improvement_value) && old_tile_value > *best_old_tile_value)) { if (in_use) { *best_value = total_value; -- 2.42.0