From 8932895b3cb6427d36197b4b03253a08624d7fa0 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 25 Apr 2005 07:25:04 +0000 Subject: [PATCH] An awful typo. Thanks to GCC4 for pointing it out. The castle ranking on random map was then completely flawed. --- src/mapgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 3fdba49fdb1..a5ab9ffd14e 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -425,7 +425,7 @@ int rank_castle_location(int x, int y, const is_valid_terrain& valid_terrain, in } const int x_from_border = minimum(x - min_x,max_x - x); - const int y_from_border = minimum(y = min_y,max_y - y); + const int y_from_border = minimum(y - min_y,max_y - y); const int border_ranking = min_distance - minimum(x_from_border,y_from_border) + min_distance - x_from_border - y_from_border;