Author: jtn
Date: Thu Feb  5 01:22:17 2015
New Revision: 27983

URL: http://svn.gna.org/viewcvs/freeciv?rev=27983&view=rev
Log:
Stop help talking about units' ability to attack relative to non-native
terrain if they can't attack at all.

See gna bug #23241.

Modified:
    branches/S2_5/client/helpdata.c
    branches/S2_5/common/movement.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=27983&r1=27982&r2=27983&view=diff
==============================================================================
--- branches/S2_5/client/helpdata.c     (original)
+++ branches/S2_5/client/helpdata.c     Thu Feb  5 01:22:17 2015
@@ -2297,7 +2297,8 @@
            _("  * Can attack units on non-native tiles.\n"));
   }
   /* Must use flag to distinguish from UTYF_MARINES text. */
-  if (uclass_has_flag(utype_class(utype), UCF_ATT_FROM_NON_NATIVE)) {
+  if (utype->attack_strength > 0
+      && uclass_has_flag(utype_class(utype), UCF_ATT_FROM_NON_NATIVE)) {
     CATLSTR(buf, bufsz,
             _("  * Can launch attack from non-native tiles.\n"));
   }

Modified: branches/S2_5/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/movement.c?rev=27983&r1=27982&r2=27983&view=diff
==============================================================================
--- branches/S2_5/common/movement.c     (original)
+++ branches/S2_5/common/movement.c     Thu Feb  5 01:22:17 2015
@@ -102,6 +102,7 @@
 bool can_attack_non_native(const struct unit_type *utype)
 {
   return uclass_has_flag(utype_class(utype), UCF_ATTACK_NON_NATIVE)
+         && utype->attack_strength > 0
          && !utype_has_flag(utype, UTYF_ONLY_NATIVE_ATTACK);
 }
 


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

Reply via email to