Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13336) [Patch] Bounce transported units fix
Home

[Freeciv-Dev] (PR#13336) [Patch] Bounce transported units fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13336) [Patch] Bounce transported units fix
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sat, 25 Jun 2005 13:59:44 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13336 >


  This patch makes sure that all kind of transported units that no 
longer can survive at the tile are bounced when stack is resolved. This 
also changes behavior so that units that can survive are not bounced.
  Patch is split from #12559.


  - ML


diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c  2005-06-25 21:55:36.265625000 +0300
+++ freeciv/server/unittools.c  2005-06-25 23:38:06.125000000 +0300
@@ -1304,7 +1304,7 @@
 
 /**************************************************************************
   For each pplayer's unit, check if we stack illegally, if so,
-  bounce both players' units. If on ocean tile, bounce everyone
+  bounce both players' units. If on ocean tile, bounce everyone but ships
   to avoid drowning. This function assumes that cities are clean.
 
   If verbose is true, the unit owner gets messages about where each
@@ -1320,7 +1320,7 @@
       unit_list_iterate_safe(ptile->units, aunit) {
         if (unit_owner(aunit) == pplayer
             || unit_owner(aunit) == aplayer
-            || is_ocean(ptile->terrain)) {
+            || !can_unit_survive_at_tile(aunit, ptile)) {
           bounce_unit(aunit, verbose);
         }
       } unit_list_iterate_safe_end;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13336) [Patch] Bounce transported units fix, Marko Lindqvist <=