Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: (PR#3930) increase MAX_NUM_NATIONS
Home

[Freeciv-Dev] Re: (PR#3930) increase MAX_NUM_NATIONS

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#3930) increase MAX_NUM_NATIONS
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Apr 2003 15:09:22 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Mike Kaufman wrote:
> 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).

>>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.


> 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 :)

Yes, exactly.  The only problem is that it may take some work to get 
there - the code is pretty spread out and embedded in various parts of 
thee code, and it's not trivial (for me) to tell where the allocations 
need to go.

> 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. 

Well, for nation selection all nations are needed.  Most/all of the rest 
of the time you are correct.

> This patch should be ashcanned.

This patch allows new nations to be added _now_.  I'm not sure how long 
a proper fix will take.  So, I disagree on this.

jason




[Prev in Thread] Current Thread [Next in Thread]