Author: jtn
Date: Thu Feb  5 01:14:55 2015
New Revision: 27973

URL: http://svn.gna.org/viewcvs/freeciv?rev=27973&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:
    trunk/client/helpdata.c
    trunk/common/movement.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=27973&r1=27972&r2=27973&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Thu Feb  5 01:14:55 2015
@@ -3380,7 +3380,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: trunk/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/movement.c?rev=27973&r1=27972&r2=27973&view=diff
==============================================================================
--- trunk/common/movement.c     (original)
+++ trunk/common/movement.c     Thu Feb  5 01:14:55 2015
@@ -166,6 +166,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