Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1276/src

Modified Files:
	data.c defaults.c feature.c 
Log Message:
Netrekrc option useFullWeapInfo to control whether to use the
new feature packet.  Cleaned up reportFeatures some to allow
for more control of user to choose what features to request.

Index: feature.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/feature.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- feature.c	18 Mar 2007 01:46:50 -0000	1.9
+++ feature.c	19 Mar 2007 04:33:51 -0000	1.10
@@ -104,20 +104,28 @@
 reportFeatures (void)
 {
     struct feature *f;
+    int value;
 
     for (f = features; f->name != 0; f++)
     {
         if (strcmpi (f->name, "FEATURE_PACKETS") != 0)
+        {
+            if (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION"))
+                value = useFullShipInfo;
+            else if (!strcmp(f->name, "FULL_WEAPON_RESOLUTION"))
+                value = useFullWeapInfo;
+            else
+                value = f->value;
             sendFeature (f->name,
                          f->feature_type,
-                         (!strcmp(f->name, "FULL_DIRECTION_RESOLUTION") ? useFullShipInfo : f->value),
+                         value,
                          (char) (f->arg1 ? *f->arg1 : 0),
                          (char) (f->arg2 ? *f->arg2 : 0));
 
 #ifdef DEBUG
-        LineToConsole ("(C->S) %s (%c): %d\n", f->name, f->feature_type,
-        !strcmp(f->name, "FULL_DIRECTION_RESOLUTION") ? useFullShipInfo : f->value);
+            LineToConsole ("(C->S) %s (%c): %d\n", f->name, f->feature_type, value);
 #endif
+        }
     }
 }
 

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- defaults.c	19 Mar 2007 04:00:27 -0000	1.60
+++ defaults.c	19 Mar 2007 04:33:51 -0000	1.61
@@ -845,6 +845,15 @@
             NULL
         }
     },
+    {"useFullWeapInfo", &useFullWeapInfo, RC_BOOL,
+        {
+            "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",
+            NULL
+        }
+    },
 #ifdef BEEPLITE
     {"useLite", &useLite, RC_BOOL,
         {
@@ -1615,6 +1624,7 @@
     soundMusicBkgd = booleanDefault ("soundMusicBkgd", soundMusicBkgd);
     soundAngles = booleanDefault ("soundAngles", soundAngles);
     useFullShipInfo = booleanDefault ("useFullShipInfo", useFullShipInfo);
+    useFullWeapInfo = booleanDefault ("useFullWeapInfo", useFullWeapInfo);
     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.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- data.c	19 Mar 2007 00:05:13 -0000	1.68
+++ data.c	19 Mar 2007 04:33:50 -0000	1.69
@@ -811,6 +811,8 @@
 int soundAngles = 0; 		/* Use 3D sound */
 
 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 headingTic = 1;		/* 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 */