? ttt.gz Index: ai/aiunit.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v retrieving revision 1.292 diff -u -r1.292 aiunit.c --- ai/aiunit.c 2003/09/25 16:55:03 1.292 +++ ai/aiunit.c 2003/09/25 17:46:22 @@ -2824,16 +2824,17 @@ punit->ai.bodyguard = BODYGUARD_WANTED; } + if (punit->moves_left <= 0) { + /* Can do nothing */ + return; + } + if ((unit_flag(punit, F_DIPLOMAT)) || (unit_flag(punit, F_SPY))) { - if (punit->moves_left <= 0) { - return; - } ai_manage_diplomat(pplayer, punit); return; } else if (unit_flag(punit, F_SETTLERS) ||unit_flag(punit, F_CITIES)) { - if (punit->moves_left == 0) return; /* can't do anything with no moves */ ai_manage_settler(pplayer, punit); return; } else if (unit_flag(punit, F_TRADE_ROUTE) @@ -2854,11 +2855,9 @@ * pretend they have fuel = HP / 3 or something. */ return; } else if (is_military_unit(punit)) { - if (punit->moves_left == 0) return; /* can't do anything with no moves */ ai_manage_military(pplayer,punit); return; } else { - if (punit->moves_left == 0) return; /* can't do anything with no moves */ (void) ai_manage_explorer(punit); /* what else could this be? -- Syela */ return; }