Index: server/unittools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v retrieving revision 1.206 diff -u -9 -r1.206 unittools.c --- server/unittools.c 16 Jan 2003 23:16:12 -0000 1.206 +++ server/unittools.c 24 Jan 2003 00:37:31 -0000 @@ -2766,40 +2766,36 @@ } unit_list_iterate_end; } square_iterate_end; } /************************************************************************** Does: 1) updates the units homecity and the city it enters/leaves (the cities happiness varies). This also takes into account if the unit enters/leaves a fortress. 2) handles any huts at the units destination. - 3) awakes any sentried units on neightboring tiles. - 4) updates adjacent cities' unavailable tiles. + 3) updates adjacent cities' unavailable tiles. FIXME: Sometimes it is not neccesary to send cities because the goverment doesn't care if a unit is away or not. **************************************************************************/ static void handle_unit_move_consequences(struct unit *punit, int src_x, int src_y, int dest_x, int dest_y) { struct city *fromcity = map_get_city(src_x, src_y); struct city *tocity = map_get_city(dest_x, dest_y); struct city *homecity = NULL; struct player *pplayer = unit_owner(punit); /* struct government *g = get_gov_pplayer(pplayer);*/ bool senthome = FALSE; if (punit->homecity != 0) homecity = find_city_by_id(punit->homecity); - wakeup_neighbor_sentries(punit); - maybe_make_first_contact(dest_x, dest_y, unit_owner(punit)); - if (tocity) handle_unit_enter_city(punit, tocity); /* We only do this for non-AI players to now make sure the AI turns doesn't take too long. Perhaps we should make a special refresh_city functions that only refreshed happiness. */ if (!pplayer->ai.control) { /* might have changed owners or may be destroyed */ tocity = map_get_city(dest_x, dest_y); @@ -3011,18 +3007,20 @@ if (unit_profits_of_watchtower(punit) && tile_has_special(psrctile, S_FORTRESS)) fog_area(pplayer, src_x, src_y, get_watchtower_vision(punit)); else fog_area(pplayer, src_x, src_y, unit_type(punit)->vision_range); handle_unit_move_consequences(punit, src_x, src_y, dest_x, dest_y); + wakeup_neighbor_sentries(punit); + maybe_make_first_contact(dest_x, dest_y, unit_owner(punit)); conn_list_do_unbuffer(&pplayer->connections); if (map_has_special(dest_x, dest_y, S_HUT)) return unit_enter_hut(punit); else return TRUE; }