Author: mir3x
Date: Sun Jul 24 20:00:46 2016
New Revision: 33316

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

See patch #7474


Modified:
    trunk/client/control.c
    trunk/client/options.c
    trunk/client/options.h

Modified: trunk/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=33316&r1=33315&r2=33316&view=diff
==============================================================================
--- trunk/client/control.c      (original)
+++ trunk/client/control.c      Sun Jul 24 20:00:46 2016
@@ -2554,6 +2554,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);
   }
@@ -2578,7 +2581,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: trunk/client/options.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/options.c?rev=33316&r1=33315&r2=33316&view=diff
==============================================================================
--- trunk/client/options.c      (original)
+++ trunk/client/options.c      Sun Jul 24 20:00:46 2016
@@ -108,6 +108,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,
@@ -2136,6 +2137,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: trunk/client/options.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/options.h?rev=33316&r1=33315&r2=33316&view=diff
==============================================================================
--- trunk/client/options.h      (original)
+++ trunk/client/options.h      Sun Jul 24 20:00:46 2016
@@ -129,6 +129,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