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

On 1/24/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
> On 1/24/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
> >
> >  Seen as global observer: Barbarian boats almost never move. If boat
> > happens to spawn next to land, it almost never unloads units to land.
>
>  Barbarian leader is in charge of the boat. He wants to go where other
> barbarians protect him. All the other barbarians are sitting in the
> same boat - in the same tile - he currently is. So the leader is very
> happy not to move the boat.

 Fix to that particular bug attached. This alone does not fix the
problem, though. Barbarian boat handling is broken in a number of
ways.


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/aiunit.c freeciv/ai/aiunit.c
--- freeciv/ai/aiunit.c	2006-07-25 13:42:32.000000000 +0300
+++ freeciv/ai/aiunit.c	2007-01-25 12:01:03.000000000 +0200
@@ -2308,6 +2308,21 @@
       handle_unit_activity_request(leader, ACTIVITY_SENTRY);
       return;
   }
+
+  if (leader->transported_by != -1) {
+    struct unit *boat = find_unit_by_id(leader->transported_by);
+
+    if (boat->ai.passenger == leader->id) {
+      /* We are in charge. Of course, since we are the leader...
+       * ...but no, we don't want to be. We just want to
+       * go where other barbarians protect us, and currently
+       * it means we don't want to move. Let some more
+       * militaristic unit that might head to conquest control
+       * the boat. */
+       aiferry_clear_boat(leader);
+    }
+  }
+
   /* the following takes much CPU time and could be avoided */
   generate_warmap(tile_get_city(leader->tile), leader);
 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to