Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs16:/tmp/cvs-serv12425/src
Modified Files:
data.c defaults.c feature.c mswindow.c
Log Message:
New netrekrc options "useCheckPlanets: (on)/off" and "useGeneric32:
(on)/off" to control whether to use the CHECK_PLANETS or
SP_GENERIC_32 feature packets.
Added improved explanation to netrekrc for the bandwidth costs of using the
4 new(ish) feature packets which actually increase bandwidth use.
Fixed bug with netrek.geometry not saving properly due to passing a null
string.
Index: feature.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- feature.c 25 Apr 2007 06:50:42 -0000 1.16
+++ feature.c 25 Apr 2007 07:21:50 -0000 1.17
@@ -117,10 +117,14 @@
{
if (strcmpi (f->name, "FEATURE_PACKETS") != 0)
{
- if (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION"))
+ if (!strcmp(f->name, "CHECK_PLANETS"))
+ value = useCheckPlanets;
+ else if (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION"))
value = useFullShipInfo;
else if (!strcmp(f->name, "FULL_WEAPON_RESOLUTION"))
value = useFullWeapInfo;
+ else if (!strcmp(f->name, "SP_GENERIC_32"))
+ value = useGeneric32;
else
value = f->value;
sendFeature (f->name,
Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- mswindow.c 23 Apr 2007 07:19:30 -0000 1.79
+++ mswindow.c 25 Apr 2007 07:21:50 -0000 1.80
@@ -5772,7 +5772,7 @@
/* TODO: fix main window so it takes into account all
the SYS_CAPTION/border size changes, too messy for now */
if (strcmpi (win->name, "netrek") == 0)
- return (geometryDefault (str));
+ return (geometryDefault ("netrek.geometry"));
/* Let's keep local and map windows square! */
else if (strcmpi (win->name, "local") == 0)
{
Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- defaults.c 18 Apr 2007 09:41:32 -0000 1.81
+++ defaults.c 25 Apr 2007 07:21:49 -0000 1.82
@@ -917,11 +917,21 @@
NULL
}
},
+ {"useCheckPlanets", &useCheckPlanets, RC_BOOL,
+ {
+ "Crosscheck with server to make sure all planet information is",
+ "correct. Prevents against lost planet updates which can cause",
+ "problems like phantom armies or not realizing a planet has",
+ "popped. Increases upstream (client to server) bandwidth usage",
+ "by 100 bytes/second.",
+ NULL
+ }
+ },
{"useFullShipInfo", &useFullShipInfo, RC_BOOL,
{
"Display other ships to 256 directions instead of 16",
"by using long ship packets instead of short ship packets,",
- "slight increase in bandwidth usage",
+ "increases bandwidth usage by several kb/second.",
NULL
}
},
@@ -929,8 +939,17 @@
{
"Allows observers to see all weapons fire on galaxy map",
"by using long torp packets instead of short torp packets,",
- "slight increase in bandwidth usage. Also allows self torps",
- "to be seen beyond tactical range, again via galactic map",
+ "can increase bandwidth usage on the order of 10 kb/second.",
+ "Also allows self torps to be seen beyond tactical range,",
+ "again via the galaxy map.",
+ NULL
+ }
+ },
+ {"useGeneric32", &useGeneric32, RC_BOOL,
+ {
+ "Receive SP_GENERIC_32 packets, which are used to convey things",
+ "like repair time and planet being orbitted. Increases bandwidth",
+ "usage by 320 bytes/second for a server running at 10 UPS.",
NULL
}
},
@@ -979,6 +998,7 @@
{"viewRange", &viewRange, RC_INT,
{
"Show range at which enemies can see you as a circle on map",
+ "Server god decides whether to enable this feature",
"0 - don't show range circle",
"1 - only show range circle when cloaked",
"2 - only show range circle when carrying",
@@ -1726,8 +1746,10 @@
soundMusic = booleanDefault ("soundMusic", soundMusic);
soundMusicBkgd = booleanDefault ("soundMusicBkgd", soundMusicBkgd);
soundAngles = booleanDefault ("soundAngles", soundAngles);
+ useCheckPlanets = booleanDefault ("useCheckPlanets", useCheckPlanets);
useFullShipInfo = booleanDefault ("useFullShipInfo", useFullShipInfo);
useFullWeapInfo = booleanDefault ("useFullWeapInfo", useFullWeapInfo);
+ useGeneric32 = booleanDefault ("useGeneric32", useGeneric32);
headingTic = booleanDefault ("headingTic", headingTic);
tractorID = booleanDefault ("tractorID", tractorID);
lockLine = booleanDefault ("lockLine", lockLine);
Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- data.c 25 Apr 2007 06:50:42 -0000 1.87
+++ data.c 25 Apr 2007 07:21:49 -0000 1.88
@@ -826,9 +826,11 @@
int soundMusicBkgd = 0; /* Play random background music continuously */
int soundAngles = 0; /* Use 3D sound */
+int useCheckPlanets = 1; /* Send CP_PLANET packets to server checking planet status */
int useFullShipInfo = 1; /* Prefer SP_PLAYER packets over SP_S_PLAYER packets */
int useFullWeapInfo = 1; /* Receive larger torp packets, get self torp info beyond
tactical, allow observer to see all weapons fire */
+int useGeneric32 = 1; /* Receive SP_GENERIC_32 packets */
int headingTic = 0; /* show ship heading tic */
int tractorID = 1; /* show ID of player you are tractoring */
int lockLine = 1; /* draw dashed line on map from you to lock target */