Author: sveinung
Date: Wed Dec 10 14:17:35 2014
New Revision: 27231

URL: http://svn.gna.org/viewcvs/freeciv?rev=27231&view=rev
Log:
AI: Path finding: Don't base tile behavior on the unit flags Spy and Diplomat.

A unit may be unable to perform spy actions even if it has the flags. Look for
the ability to perform hostile actions in stead.

See patch #5512

Modified:
    trunk/ai/default/aitools.c

Modified: trunk/ai/default/aitools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aitools.c?rev=27231&r1=27230&r2=27231&view=diff
==============================================================================
--- trunk/ai/default/aitools.c  (original)
+++ trunk/ai/default/aitools.c  Wed Dec 10 14:17:35 2014
@@ -560,8 +560,8 @@
     parameter->get_zoc = NULL;
   }
 
-  if ((unit_has_type_flag(punit, UTYF_DIPLOMAT))
-      || (unit_has_type_flag(punit, UTYF_SPY))) {
+  if (is_actor_unit(punit)
+      && utype_acts_hostile(unit_type(punit))) {
     /* Default tile behaviour */
   } else if (unit_has_type_flag(punit, UTYF_SETTLERS)) {
     parameter->get_TB = no_fights;


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

Reply via email to