Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] (PR#15002) Remove dead goto code
Home

[Freeciv-Dev] (PR#15002) Remove dead goto code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#15002) Remove dead goto code
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 27 Dec 2005 04:41:40 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15002 >

This dead goto code now gives warnings (someone removed header reference
to ailog.h?). The proper solution is of course to remove the dead code.
Patch attached.

  - Per

Index: server/unittools.c
===================================================================
--- server/unittools.c  (revision 11400)
+++ server/unittools.c  (working copy)
@@ -787,17 +787,6 @@
     }
   }
 
-  if (activity==ACTIVITY_GOTO) {
-    if (!punit->ai.control && (!is_military_unit(punit) ||
-       punit->ai.passenger != 0 || !pplayer->ai.control)) {
-/* autosettlers otherwise waste time; idling them breaks assignment */
-/* Stalling infantry on GOTO so I can see where they're GOing TO. -- Syela */
-UNIT_LOG(LOG_ERROR, punit, "using old goto code in unittols.c!");
-      (void) do_unit_goto(punit, GOTO_MOVE_ANY, TRUE);
-    }
-    return;
-  }
-
   if (find_unit_by_id(id) && unit_has_orders(punit)) {
     if (!execute_orders(punit)) {
       /* Unit died. */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15002) Remove dead goto code, Per I. Mathisen <=