[Freeciv-Dev] Patch: bodyguard code active (PR#197)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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--
-------
- [Freeciv-Dev] Patch: bodyguard code active (PR#197),
Peter Schaefer <=
|
|