? target1.diff Index: ai/ailog.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/ailog.c,v retrieving revision 1.7 diff -u -r1.7 ailog.c --- ai/ailog.c 2003/07/17 18:56:50 1.7 +++ ai/ailog.c 2003/09/25 14:05:13 @@ -74,6 +74,10 @@ return; } + if (unit_owner(punit)->player_no != 4) { + return; + } + if (is_goto_dest_set(punit)) { gx = goto_dest_x(punit); gy = goto_dest_y(punit); Index: ai/ailog.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/ailog.h,v retrieving revision 1.3 diff -u -r1.3 ailog.h --- ai/ailog.h 2002/11/15 22:15:01 1.3 +++ ai/ailog.h 2003/09/25 14:05:13 @@ -23,7 +23,7 @@ * part of the AI code. */ #define LOGLEVEL_BODYGUARD LOG_DEBUG -#define LOGLEVEL_UNIT LOG_DEBUG +#define LOGLEVEL_UNIT LOG_NORMAL #define LOGLEVEL_GOTO LOG_DEBUG #define LOGLEVEL_CITY LOG_DEBUG #define LOGLEVEL_BUILD LOG_DEBUG Index: ai/aiunit.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v retrieving revision 1.290 diff -u -r1.290 aiunit.c --- ai/aiunit.c 2003/09/23 18:57:39 1.290 +++ ai/aiunit.c 2003/09/25 14:05:14 @@ -1358,8 +1358,7 @@ if (!goto_is_sane(punit, dest_x, dest_y, TRUE) || (ferryboat && goto_is_sane(ferryboat, dest_x, dest_y, TRUE))) { punit->ai.ferryboat = boatid; - freelog(LOG_DEBUG, "%s: %d@(%d, %d): Looking for BOAT (id=%d).", - pplayer->name, punit->id, punit->x, punit->y, boatid); + UNIT_LOG(LOG_DEBUG, punit, "Looking for boat[%d].", boatid); if (boatid > 0 && !same_pos(x, y, bx, by)) { /* Go to the boat */ /* FIXME: this can lose bodyguard */ @@ -1375,19 +1374,20 @@ || ferryboat->ai.passenger == punit->id)) { int boat_x, boat_y; - freelog(LOG_DEBUG, "We have FOUND BOAT, %d ABOARD %d@(%d,%d)->(%d, %d).", - punit->id, ferryboat->id, punit->x, punit->y, dest_x, dest_y); + UNIT_LOG(LOG_DEBUG, punit, "Found boat[%d], going (%d,%d)", + ferryboat->id, dest_x, dest_y); handle_unit_activity_request(punit, ACTIVITY_SENTRY); ferryboat->ai.passenger = punit->id; /* Last ingredient: a beachhead. */ if (find_beachhead(punit, dest_x, dest_y, &boat_x, &boat_y)) { + UNIT_LOG(LOG_DEBUG, punit, "Found beachhead (%d,%d)", boat_x, boat_y); set_goto_dest(ferryboat, boat_x, boat_y); set_goto_dest(punit, dest_x, dest_y); if (ground_unit_transporter_capacity(punit->x, punit->y, pplayer) <= 0) { /* FIXME: perhaps we should only require only two passengers */ - freelog(LOG_DEBUG, "All aboard!"); + UNIT_LOG(LOG_DEBUG, ferryboat, "All aboard!"); unit_list_iterate(ptile->units, mypass) { if (mypass->ai.ferryboat == ferryboat->id && punit->owner == mypass->owner) { @@ -1448,17 +1448,13 @@ } /* end 'short leash' subroutine */ - freelog(LOG_DEBUG, "GOTHERE: %s#%d@(%d,%d)->(%d,%d)", - unit_type(punit)->name, punit->id, - punit->x, punit->y, dest_x, dest_y); + UNIT_LOG(LOG_DEBUG, punit, "Attempt to walk to (%d,%d)", dest_x, dest_y); if (!ai_unit_goto(punit, dest_x, dest_y)) { return -1; /* died */ } /* liable to bump into someone that will kill us. Should avoid? */ } else { - freelog(LOG_DEBUG, "%s#%d@(%d,%d) not moving -> (%d, %d)", - unit_type(punit)->name, punit->id, - punit->x, punit->y, dest_x, dest_y); + UNIT_LOG(LOG_DEBUG, punit, "Not moving"); } /* Dead unit shouldn't reach this point */