Author: sveinung Date: Fri Jan 29 13:30:08 2016 New Revision: 31676 URL: http://svn.gna.org/viewcvs/freeciv?rev=31676&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: branches/S2_6/common/packets.def branches/S2_6/common/unittype.h branches/S2_6/data/alien/units.ruleset branches/S2_6/data/civ1/units.ruleset branches/S2_6/data/civ2/units.ruleset branches/S2_6/data/civ2civ3/units.ruleset branches/S2_6/data/classic/units.ruleset branches/S2_6/data/experimental/units.ruleset branches/S2_6/data/multiplayer/units.ruleset branches/S2_6/fc_version Modified: branches/S2_6/common/packets.def URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/packets.def?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/common/packets.def (original) +++ branches/S2_6/common/packets.def Fri Jan 29 13:30:08 2016 @@ -1295,7 +1295,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: branches/S2_6/common/unittype.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/unittype.h?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/common/unittype.h (original) +++ branches/S2_6/common/unittype.h Fri Jan 29 13:30:08 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: branches/S2_6/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/alien/units.ruleset (original) +++ branches/S2_6/data/alien/units.ruleset Fri Jan 29 13:30:08 2016 @@ -327,7 +327,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: branches/S2_6/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/civ1/units.ruleset (original) +++ branches/S2_6/data/civ1/units.ruleset Fri Jan 29 13:30:08 2016 @@ -246,7 +246,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: branches/S2_6/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/civ2/units.ruleset (original) +++ branches/S2_6/data/civ2/units.ruleset Fri Jan 29 13:30:08 2016 @@ -258,7 +258,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: branches/S2_6/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2civ3/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/civ2civ3/units.ruleset (original) +++ branches/S2_6/data/civ2civ3/units.ruleset Fri Jan 29 13:30:08 2016 @@ -366,7 +366,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: branches/S2_6/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/classic/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/classic/units.ruleset (original) +++ branches/S2_6/data/classic/units.ruleset Fri Jan 29 13:30:08 2016 @@ -343,7 +343,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: branches/S2_6/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/experimental/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/experimental/units.ruleset (original) +++ branches/S2_6/data/experimental/units.ruleset Fri Jan 29 13:30:08 2016 @@ -357,7 +357,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: branches/S2_6/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/multiplayer/units.ruleset?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/data/multiplayer/units.ruleset (original) +++ branches/S2_6/data/multiplayer/units.ruleset Fri Jan 29 13:30:08 2016 @@ -342,7 +342,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: branches/S2_6/fc_version URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/fc_version?rev=31676&r1=31675&r2=31676&view=diff ============================================================================== --- branches/S2_6/fc_version (original) +++ branches/S2_6/fc_version Fri Jan 29 13:30:08 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-2.6-2016.Jan.29" +NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2016.Jan.29b" NETWORK_CAPSTRING_OPTIONAL="" FREECIV_DISTRIBUTOR="" _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits