AI should not explore with gameloss units

Per Inge Mathisen <per-0/[email protected]> Sun, 20 Mar 2005 12:56:27 +0000 (GMT)
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
See $SUBJECT, small patch attached. Committed.

  - Per
explore1.diff (text/plain, 677 B)
Index: ai/aiexplorer.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiexplorer.c,v
retrieving revision 1.8
diff -u -r1.8 aiexplorer.c
--- ai/aiexplorer.c	14 Mar 2005 20:26:24 -0000	1.8
+++ ai/aiexplorer.c	20 Mar 2005 12:55:54 -0000
@@ -273,6 +273,10 @@
   double logDF = log(DIST_FACTOR);
   double logBPS = log(BEST_POSSIBLE_SCORE);
 
+  if (pplayer->ai.control && unit_flag(punit, F_GAMELOSS)) {
+    return FALSE; /* too dangerous */
+  }
+
   pft_fill_unit_parameter(&parameter, punit);
   parameter.get_TB = no_fights_or_unknown;
   /* When exploring, even AI should pretend to not cheat. */