Author: sveinung
Date: Fri Jan 29 13:26:11 2016
New Revision: 31675

URL: http://svn.gna.org/viewcvs/freeciv?rev=31675&view=rev
Log:
Make max paradrop range cover the full map.

Transfer paratroopers_range as an UIN16 and increase UNIT_MAX_PARADROP_RANGE
to 65534. (65535 is reserved for signaling the lack of a range limit)

Reported by Marko Lindqvist <cazfi>

See bug #24349

Modified:
    trunk/common/packets.def
    trunk/common/unittype.h
    trunk/data/alien/units.ruleset
    trunk/data/civ1/units.ruleset
    trunk/data/civ2/units.ruleset
    trunk/data/civ2civ3/units.ruleset
    trunk/data/classic/units.ruleset
    trunk/data/experimental/units.ruleset
    trunk/data/multiplayer/units.ruleset
    trunk/data/sandbox/units.ruleset
    trunk/data/stub/units.ruleset
    trunk/fc_version

Modified: trunk/common/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/packets.def?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/common/packets.def    (original)
+++ trunk/common/packets.def    Fri Jan 29 13:26:11 2016
@@ -1301,7 +1301,7 @@
   UINT8 happy_cost;   # unhappy people in home city
   UINT8 upkeep[O_LAST]; # normal upkeep cost (food, gold, shields)
 
-  UINT8 paratroopers_range;  # max range of paratroopers, F_PARATROOPERS
+  UINT16 paratroopers_range; # max range of paratroopers, UTYF_PARATROOPERS
   UINT8 paratroopers_mr_req; # whole move points, not MOVEFRAGS
   UINT8 paratroopers_mr_sub; # whole move points, not MOVEFRAGS
 

Modified: trunk/common/unittype.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.h?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/common/unittype.h     (original)
+++ trunk/common/unittype.h     Fri Jan 29 13:26:11 2016
@@ -38,10 +38,18 @@
 #define U_LAST MAX_NUM_ITEMS
 
 /* The largest distance a ruleset can allow a unit to paradrop.
+ *
  * Remember to make sure that the field type of PACKET_RULESET_UNIT's
  * paratroopers_range field can transfer the new maximum if you increase
- * it. */
-#define UNIT_MAX_PARADROP_RANGE 255
+ * it.
+ *
+ * The top value is reserved in case a future Freeciv version wants to
+ * implement "no maximum range". It could be used to signal that the unit
+ * can paradrop anywhere. Note that the value below it is high enough to
+ * give the same effect on all maps inside the current size limits.
+ * (No map side can be larger than MAP_MAX_LINEAR_SIZE)
+ */
+#define UNIT_MAX_PARADROP_RANGE (65535 - 1)
 
 /* Used in the network protocol. */
 #define SPECENUM_NAME unit_class_flag_id

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/alien/units.ruleset      (original)
+++ trunk/data/alien/units.ruleset      Fri Jan 29 13:26:11 2016
@@ -335,7 +335,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/civ1/units.ruleset       (original)
+++ trunk/data/civ1/units.ruleset       Fri Jan 29 13:26:11 2016
@@ -251,7 +251,7 @@
 ; Following flag strings require extra fields:  (but do not appear in Civ1)
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/civ2/units.ruleset       (original)
+++ trunk/data/civ2/units.ruleset       Fri Jan 29 13:26:11 2016
@@ -263,7 +263,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Fri Jan 29 13:26:11 2016
@@ -375,7 +375,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/classic/units.ruleset    (original)
+++ trunk/data/classic/units.ruleset    Fri Jan 29 13:26:11 2016
@@ -349,7 +349,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/experimental/units.ruleset       (original)
+++ trunk/data/experimental/units.ruleset       Fri Jan 29 13:26:11 2016
@@ -363,7 +363,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/multiplayer/units.ruleset        (original)
+++ trunk/data/multiplayer/units.ruleset        Fri Jan 29 13:26:11 2016
@@ -348,7 +348,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/sandbox/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/sandbox/units.ruleset    (original)
+++ trunk/data/sandbox/units.ruleset    Fri Jan 29 13:26:11 2016
@@ -376,7 +376,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/data/stub/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/units.ruleset?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/data/stub/units.ruleset       (original)
+++ trunk/data/stub/units.ruleset       Fri Jan 29 13:26:11 2016
@@ -267,7 +267,7 @@
 ; Following flag strings require extra fields:
 ;  "Paratroopers"
 ;   paratroopers_range  = the maximal range the unit can be paradropped to.
-;                         Max range is 255.
+;                         Max range is 65534.
 ;   paratroopers_mr_req = the move rate which is required at least for
 ;                         paradropping (whole movement points)
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=31675&r1=31674&r2=31675&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Fri Jan 29 13:26:11 2016
@@ -54,7 +54,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Jan.29"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Jan.29b"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""


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

Reply via email to