AI hunter fix
Per Inge Mathisen <per-0/[email protected]> Sat, 19 Mar 2005 23:41:10 +0000 (GMT)
| Newsgroups | gmane.games.freeciv.ai |
|---|---|
| Message-ID | <[email protected]> |
This fixes a pretty bad error in the AI hunter code, which makes land units hunt land units that are on transports... - Per
aihunt1.diff
(text/plain, 723 B)
Index: ai/aihunt.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aihunt.c,v
retrieving revision 1.14
diff -u -r1.14 aihunt.c
--- ai/aihunt.c 14 Mar 2005 20:26:24 -0000 1.14
+++ ai/aihunt.c 19 Mar 2005 23:37:29 -0000
@@ -281,6 +281,7 @@
if (ptile->city
|| TEST_BIT(target->ai.hunted, pplayer->player_no)
|| (!is_ocean(ptile->terrain) && is_sailing_unit(punit))
+ || (is_ocean(ptile->terrain) && is_ground_unit(punit))
|| (!is_sailing_unit(target) && is_sailing_unit(punit))
|| (is_sailing_unit(target) && !is_sailing_unit(punit))
|| !goto_is_sane(punit, target->tile, TRUE)) {