diff -ru -X /home/jjm/cvs/no.freeciv FreecivCVS/client/control.c freeciv/client/control.c --- FreecivCVS/client/control.c Mon Feb 21 15:36:58 2000 +++ freeciv/client/control.c Sat Mar 11 14:08:36 2000 @@ -162,7 +162,7 @@ } } } - + /* We have to do this ourselves, and not rely on set_unit_focus(), * because above we change punit_focus directly. */ @@ -170,6 +170,12 @@ refresh_tile_mapcanvas(punit_old_focus->x, punit_old_focus->y, 1); set_unit_focus(punit_focus); + + /* Handle auto-turn-done mode: If a unit was in focus (did move), + * but now none are (no more to move), then fake a Turn Done keypress. + */ + if(auto_turn_done && punit_old_focus!=NULL && punit_focus==NULL) + key_end_turn(); } /************************************************************************** diff -ru -X /home/jjm/cvs/no.freeciv FreecivCVS/client/options.c freeciv/client/options.c --- FreecivCVS/client/options.c Tue Feb 1 15:51:26 2000 +++ freeciv/client/options.c Sat Mar 11 14:00:14 2000 @@ -43,6 +43,7 @@ int draw_diagonal_roads=1; int center_when_popup_city=1; int concise_city_production=0; +int auto_turn_done=0; int draw_map_grid=0; #define GEN_OPTION(name, description) { #name, description, &name, NULL } @@ -60,6 +61,7 @@ GEN_OPTION(draw_diagonal_roads, N_("Draw Diagonal Roads/Rails ")), GEN_OPTION(center_when_popup_city, N_("Center map when Popup city ")), GEN_OPTION(concise_city_production, N_("Concise City Production ")), + GEN_OPTION(auto_turn_done, N_("End Turn when done moving ")), NULL_OPTION }; diff -ru -X /home/jjm/cvs/no.freeciv FreecivCVS/client/options.h freeciv/client/options.h --- FreecivCVS/client/options.h Tue Feb 1 15:51:26 2000 +++ freeciv/client/options.h Sat Mar 11 14:00:14 2000 @@ -24,6 +24,7 @@ extern int draw_diagonal_roads; extern int center_when_popup_city; extern int concise_city_production; +extern int auto_turn_done; extern int draw_map_grid; typedef struct {