Author: mir3x
Date: Sun Jul 24 20:00:33 2016
New Revision: 33315

URL: http://svn.gna.org/viewcvs/freeciv?rev=33315&view=rev
Log:
New client option - to not show automated units.

See patch #7474


Modified:
    branches/S2_6/client/control.c
    branches/S2_6/client/options.c
    branches/S2_6/client/options.h

Modified: branches/S2_6/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/control.c?rev=33315&r1=33314&r2=33315&view=diff
==============================================================================
--- branches/S2_6/client/control.c      (original)
+++ branches/S2_6/client/control.c      Sun Jul 24 20:00:33 2016
@@ -2387,6 +2387,9 @@
       && !unit_has_orders(punit)
       && punit->activity != ACTIVITY_GOTO
       && punit->activity != ACTIVITY_SENTRY
+      && ((gui_options.auto_center_on_automated == TRUE
+           && punit->ai_controlled == TRUE)
+          || (punit->ai_controlled == FALSE))
       && !tile_visible_and_not_on_border_mapcanvas(dst_tile)) {
     center_tile_mapcanvas(dst_tile);
   }
@@ -2409,7 +2412,10 @@
      * the tile without the unit (because it was unlinked above). */
     refresh_unit_mapcanvas(punit, src_tile, TRUE, FALSE);
 
-    if (do_animation) {
+    if (gui_options.auto_center_on_automated == FALSE
+        && punit->ai_controlled == TRUE) {
+      /* Dont animate automatic units */
+    } else if (do_animation) {
       int dx, dy;
 
       /* For the duration of the animation the unit exists at neither

Modified: branches/S2_6/client/options.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.c?rev=33315&r1=33314&r2=33315&view=diff
==============================================================================
--- branches/S2_6/client/options.c      (original)
+++ branches/S2_6/client/options.c      Sun Jul 24 20:00:33 2016
@@ -107,6 +107,7 @@
   .smooth_combat_step_msec = 10,
   .ai_manual_turn_done = TRUE,
   .auto_center_on_unit = TRUE,
+  .auto_center_on_automated = TRUE,
   .auto_center_on_combat = FALSE,
   .auto_center_each_turn = TRUE,
   .wakeup_focus = TRUE,
@@ -2101,6 +2102,10 @@
   GEN_BOOL_OPTION(auto_center_on_unit, N_("Auto center on units"),
                   N_("Set this option to have the active unit centered "
                      "automatically when the unit focus changes."),
+                  COC_INTERFACE, GUI_STUB, TRUE, NULL),
+  GEN_BOOL_OPTION(auto_center_on_automated, N_("Show automated units"),
+                  N_("Disable this option if you do not want to see "
+                     "automated units autocentered and animated"),
                   COC_INTERFACE, GUI_STUB, TRUE, NULL),
   GEN_BOOL_OPTION(auto_center_on_combat, N_("Auto center on combat"),
                   N_("Set this option to have any combat be centered "

Modified: branches/S2_6/client/options.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.h?rev=33315&r1=33314&r2=33315&view=diff
==============================================================================
--- branches/S2_6/client/options.h      (original)
+++ branches/S2_6/client/options.h      Sun Jul 24 20:00:33 2016
@@ -128,6 +128,7 @@
   int smooth_combat_step_msec;
   bool ai_manual_turn_done;
   bool auto_center_on_unit;
+  bool auto_center_on_automated;
   bool auto_center_on_combat;
   bool auto_center_each_turn;
   bool wakeup_focus;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to