Summary: Range of trademindist 1-999 is too big for network
packet format (UINT8)
Submitted by: jtn
Submitted on: Tue Jul 24 21:23:17 2012
Severity: 3 - Normal
Priority: 5 - Normal
Assigned to: None
Release: trunk r21615
Discussion Lock: Any
Operating System: Any
"trademindist" has an advertised range of 1-999, and it ends up as an "int" in
packets_gen.h, but the underlying type in packets.def is a UINT8.
Noticed when browsing the online help for the civ2civ3 ruleset; it says:
* Can establish trade routes (must travel to target city and must be at least
231 tiles [in Manhattan distance] from this unit's home city).
I thought "that's a funny number". On the server, "trademindist" has the value
999. 231 is the obvious modular reduction.
(I haven't delved into why civ2civ3 is using that value, and if it's
intentional, whether we can make the online help not imply trade is useful --
those are separate issues.)
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list