Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6413) fix the sanity check for unavailable tiles
Home

[Freeciv-Dev] (PR#6413) fix the sanity check for unavailable tiles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6413) fix the sanity check for unavailable tiles
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 6 Oct 2003 12:58:59 -0700
Reply-to: rt@xxxxxxxxxxxxxx

check_cities should go straight to the source to verify that a tile is 
actually unavailable.

jason

? core.16822
? sanity.diff
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.35
diff -u -r1.35 sanitycheck.c
--- server/sanitycheck.c        2003/09/23 18:53:08     1.35
+++ server/sanitycheck.c        2003/10/06 19:51:45
@@ -25,6 +25,7 @@
 #include "terrain.h"
 #include "unit.h"
 
+#include "citytools.h"
 #include "maphand.h"
 #include "sanitycheck.h"
 #include "unittools.h"
@@ -196,10 +197,7 @@
            }
            break;
          case C_TILE_UNAVAILABLE:
-           if (!map_get_tile(map_x, map_y)->worked
-               && !is_enemy_unit_tile(ptile, pplayer)
-               && map_is_known(map_x, map_y, pplayer)
-               && (!owner || owner->player_no == pcity->owner)) {
+           if (city_can_work_tile(pcity, x, y)) {
              freelog(LOG_ERROR, "Tile at %s->%d,%d marked as "
                      "unavailable but seems to be available!",
                      pcity->name, x, y);

[Prev in Thread] Current Thread [Next in Thread]