[Freeciv-Dev] Re: (PR#3930) increase MAX_NUM_NATIONS
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Apr 04, 2003 at 12:27:10PM -0800, Jason Short wrote:
>
> The attached patch increases MAX_NUM_NATIONS to 90, which requires a new
> manditory capability. This is a portion of the original PR#3589 (which
> was never updated with a capability).
>
> I don't know where 90 came from. Increasing this value is a tradeoff
> between breaking network compatability less often and having more wasted
> space for static storage. 90 seems fine to me...
>
> Ideally, MAX_NUM_NATIONS should be removed so that the server and client
> do not need to have identical values for it. This would also mean less
> wasted space in most cases. Unfortunately it's not trivial to do this -
> but any patches to help toward that goal would be welcome.
>
> jason
hell yes it should be removed. In fact, looking at the code, there seems to
be no reason whatsoever for MAX_NUM_NATIONS to exist at all. Any place
where should be used should use game.nation_count and dynamically allocate
the arrays. MAX_NUM_NATIONS seems to be left over from Raimar's 64k purge a
while back. My only qualm is the possibility of having to send a couple
thousand nations to the client :) Ideally, only nations that are in use
should be sent, and if another comes into play, it should be sent as well,
Then only MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS are ever needed to be sent
over the wire.
This patch should be ashcanned.
-mike
|
|