Author: sveinung
Date: Tue Jul 21 15:47:06 2015
New Revision: 29231

URL: http://svn.gna.org/viewcvs/freeciv?rev=29231&view=rev
Log:
Allow capturing unseen units.

Remove the hard coded rule that "Capture Units" can't be done to unseen
target units. No assumptions that the victims of unit capture is seen were
found.

Note that civ2civ3 and alien still forbid capturing units inside a city.

See patch #6134

Modified:
    trunk/common/actions.c
    trunk/doc/README.actions

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=29231&r1=29230&r2=29231&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Tue Jul 21 15:47:06 2015
@@ -472,11 +472,9 @@
     }
   }
 
-  if (action_get_target_kind(wanted_action) == ATK_UNIT
-      || (action_get_target_kind(wanted_action) == ATK_UNITS
-          && wanted_action != ACTION_BOMBARD)) {
-    /* The Freeciv code for all actions that targets a unit or all units at
-     * a tile that is controlled by action enablers assumes that the acting
+  if (action_get_target_kind(wanted_action) == ATK_UNIT) {
+    /* The Freeciv code for all actions that is controlled by action
+     * enablers and targets a unit assumes that the acting
      * player can see the target unit. */
     if (!can_player_see_unit(actor_player, target_unit)) {
       return FALSE;

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=29231&r1=29230&r2=29231&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Tue Jul 21 15:47:06 2015
@@ -231,7 +231,6 @@
  * UI name can be set using ui_name_capture_units
  * actor must be on the same tile as the target or on the tile next to it.
  * target must be foreign.
- * target must be visible to the actor.
 
 "Bombard" - bombard the units (and city) at the tile without killing them.
  * UI name can be set using ui_name_bombard


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

Reply via email to