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

[Freeciv-Dev] (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] (PR#3930) increase MAX_NUM_NATIONS
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Apr 2003 12:27:10 -0800
Reply-to: rt@xxxxxxxxxxxxxx

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

Index: common/capstr.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/capstr.c,v
retrieving revision 1.130
diff -u -r1.130 capstr.c
--- common/capstr.c     2003/04/04 15:47:48     1.130
+++ common/capstr.c     2003/04/04 20:22:00
@@ -77,7 +77,7 @@
 #define CAPABILITY "+1.14.0 conn_info +occupied team tech_impr_gfx " \
                    "city_struct_minor_cleanup obsolete_last class_legend " \
                    "+impr_req +waste +fastfocus +continent +small_dipl " \
-                   "+no_nation_selected"
+                   "+no_nation_selected +more_nations"
 /* "+1.14.0" is protocol for 1.14.0 release.
  *
  * "conn_info" is sending the conn_id field. To preserve compatability
@@ -115,6 +115,9 @@
  *
  * "no_nation_selected" means that -1 (NO_NATION_SELECTED) is used for
  * players who have no assigned nation (rather than MAX_NUM_NATIONS).
+ *
+ * "more_nations" means that MAX_NUM_NATIONS==90, so up to 90 nations are
+ * possible.
  */
 
 void init_our_capability(void)
Index: common/nation.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/nation.h,v
retrieving revision 1.23
diff -u -r1.23 nation.h
--- common/nation.h     2003/04/01 17:19:49     1.23
+++ common/nation.h     2003/04/04 20:22:00
@@ -19,7 +19,7 @@
 #define MAX_NUM_TECH_GOALS 10
 
 /* Changing either of these values will break network compatibility. */
-#define MAX_NUM_NATIONS  63
+#define MAX_NUM_NATIONS  90
 #define NO_NATION_SELECTED (Nation_Type_id)(-1)
 
 /* 

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