[Freeciv-Dev] (PR#37789) [Patch] Don't bounce ocean city defenders when loading saved game

2007-03-08 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=37789 

 $subject


 - ML

diff -Nurd -X.diff_ignore freeciv/server/savegame.c freeciv/server/savegame.c
--- freeciv/server/savegame.c	2007-03-08 17:18:27.0 +0200
+++ freeciv/server/savegame.c	2007-03-08 22:32:01.0 +0200
@@ -3980,8 +3980,7 @@
 unit_list_iterate_safe(pplayer-units, punit) {
   struct unit *ferry = find_unit_by_id(punit-transported_by);
 
-  if (is_ocean(tile_get_terrain(punit-tile))
-   is_ground_unit(punit)  !ferry) {
+  if (!ferry  !can_unit_exist_at_tile(punit, punit-tile)) {
 freelog(LOG_ERROR, Removing %s's unferried %s in ocean at (%d, %d),
 pplayer-name, unit_name(punit-type), TILE_XY(punit-tile));
 bounce_unit(punit, TRUE);
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#37789) [Patch] Don't bounce ocean city defenders when loading saved game

2007-03-08 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=37789 

 - Error message correct in generic case and translated. This message
is important to player.


 - ML

diff -Nurd -X.diff_ignore freeciv/server/savegame.c freeciv/server/savegame.c
--- freeciv/server/savegame.c	2007-03-08 17:18:27.0 +0200
+++ freeciv/server/savegame.c	2007-03-09 00:01:27.0 +0200
@@ -3980,10 +3980,11 @@
 unit_list_iterate_safe(pplayer-units, punit) {
   struct unit *ferry = find_unit_by_id(punit-transported_by);
 
-  if (is_ocean(tile_get_terrain(punit-tile))
-   is_ground_unit(punit)  !ferry) {
-freelog(LOG_ERROR, Removing %s's unferried %s in ocean at (%d, %d),
-pplayer-name, unit_name(punit-type), TILE_XY(punit-tile));
+  if (!ferry  !can_unit_exist_at_tile(punit, punit-tile)) {
+freelog(LOG_ERROR, _(Removing %s's unferried %s in %s at (%d, %d)),
+pplayer-name, unit_name(punit-type),
+get_name(punit-tile-terrain),
+TILE_XY(punit-tile));
 bounce_unit(punit, TRUE);
   }
 } unit_list_iterate_safe_end;
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev