[Freeciv-Dev] Re: (PR#4820) ground_unit_transporter_capacity
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 11 Aug 2003, Per I. Mathisen wrote:
> If you really want to find out: Load the savegame, then set all AIs to
> human. Then log in to each and look for units swimming in the ocean.
> Perhaps easier to find if you replace the assert in sanitycheck.c with a
> +die("Unit swimming in ocean at (%d, %d)", punit->x, punit->y);
Or like this:
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.31
diff -u -r1.31 sanitycheck.c
--- server/sanitycheck.c 2003/08/01 15:58:08 1.31
+++ server/sanitycheck.c 2003/08/11 19:48:37
@@ -255,8 +255,10 @@
pcity = map_get_city(x, y);
if (pcity) {
assert(pplayers_allied(city_owner(pcity), pplayer));
- } else if (is_ocean(map_get_terrain(x, y))) {
- assert(ground_unit_transporter_capacity(x, y, pplayer) >= 0);
+ } else if (is_ocean(map_get_terrain(x, y))
+ && ground_unit_transporter_capacity(x, y, pplayer) >= 0) {
+ die("%s's unit swimming in the ocean at (%d, %d)", pplayer->name,
+ x, y);
}
sanitycheck.c really ought to have die() calls rather than asserts, since
asserts in there give you very little information.
- Per
[Freeciv-Dev] Re: (PR#4820) ground_unit_transporter_capacity, Per I. Mathisen, 2003/08/12
|
|