Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1999:
[Freeciv-Dev] Patch: bodyguard code active (PR#197)
Home

[Freeciv-Dev] Patch: bodyguard code active (PR#197)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Patch: bodyguard code active (PR#197)
From: Peter Schaefer <schaefer@xxxxxx>
Date: Sun, 19 Dec 1999 12:58:49 -0800 (PST)

Problem:
Let the AI play some time. Find two units that move as a pair, for
example
a warrior and it´s bodyguard, an alpine troop. These often are aboard
ships.
Turn ai off. You are unable to move one unit, because it refuses to
leave
it´s bodyguard.

the 1-line patch checks whether AI is active.
--------------F86D35CA8D8517C60DE71381
Content-Type: text/plain; charset=us-ascii;
 name="bodyguar.pat"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bodyguar.pat"

--- freeciv-1.9.0/server/unithand.c     Mon Oct  4 06:23:35 1999
+++ freeciv-1.9.0-release/server/unithand.c     Fri Dec 17 20:12:44 1999
@@ -858,7 +858,7 @@
                       _("Game: You can't attack there."));
       return 0;
     };
-  } else if (punit->ai.bodyguard > 0 && (bodyguard = 
unit_list_find(&map_get_tile(punit->x,
+  } else if (pplayer->ai.control && punit->ai.bodyguard > 0 && (bodyguard = 
unit_list_find(&map_get_tile(punit->x,
       punit->y)->units, punit->ai.bodyguard)) && !bodyguard->moves_left) {
     notify_player_ex(pplayer, punit->x, punit->y, E_NOEVENT,
                     _("Game: %s doesn't want to leave its bodyguard."),

--------------F86D35CA8D8517C60DE71381--


-------

[Prev in Thread] Current Thread [Next in Thread]