Author: persia
Date: Thu Jun 26 11:11:00 2014
New Revision: 25270

URL: http://svn.gna.org/viewcvs/freeciv?rev=25270&view=rev
Log:
Fix reversed logic in dai_is_unit_tired_waiting_boat

See patch #4839

Modified:
    trunk/ai/default/aiunit.c

Modified: trunk/ai/default/aiunit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aiunit.c?rev=25270&r1=25269&r2=25270&view=diff
==============================================================================
--- trunk/ai/default/aiunit.c   (original)
+++ trunk/ai/default/aiunit.c   Thu Jun 26 11:11:00 2014
@@ -1942,7 +1942,6 @@
   struct tile *src = NULL, *dest = NULL, *src_home_city = NULL;
   struct city *phome_city = NULL;
   struct unit_ai *unit_data = def_ai_unit_data(punit, ait);
-  bool required_boat = FALSE;
   
   if ((unit_data->task != AIUNIT_NONE)) {
     src = unit_tile(punit);
@@ -1960,9 +1959,7 @@
       return FALSE;
     }
 
-    required_boat = goto_is_sane(punit, dest);
-
-    if (required_boat) {
+    if (!goto_is_sane(punit, dest)) {
       if (unit_transported(punit)) {
         /* if we're being transported */
         return FALSE;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to