Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs16:/tmp/cvs-serv17208/src

Modified Files:
	defaults.c local.c short.c 
Log Message:
Password, playerlist2 layout, b1keymap - b5keymap, and metaservers
now save via in-game save key.
Netrekrc now has a line for playerList2 and password so people know
these more useful options exist.
Yet another bug fix for phaser misses (set x,y to 0 on miss if phaser is
received via short packets).

Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- short.c	8 Apr 2007 22:36:42 -0000	1.22
+++ short.c	12 Apr 2007 00:56:28 -0000	1.23
@@ -2016,6 +2016,8 @@
         target = (unsigned char) packet->target & 0x3f;
         break;
     case PHMISS:
+        x = 0;
+        y = 0;
         dir = (unsigned char) packet->target;
         break;
     case PHHIT2:

Index: local.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- local.c	11 Apr 2007 23:06:34 -0000	1.95
+++ local.c	12 Apr 2007 00:56:28 -0000	1.96
@@ -1590,6 +1590,7 @@
                        so check if we have it first */
                     if (php->ph_x > 0 && php->ph_y > 0 && php->ph_x < GWIDTH && php->ph_y < GWIDTH)
                     {
+                        LineToConsole("x, y %d %d\n", php->ph_x, php->ph_y);
                         tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2;
                         ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2;
                     }

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- defaults.c	11 Apr 2007 23:06:33 -0000	1.76
+++ defaults.c	12 Apr 2007 00:56:28 -0000	1.77
@@ -2151,7 +2151,18 @@
     	if (saveBig)
     	    fputs ("\n", fp);
     }
-    
+
+    // Password
+    if (defpasswd != NULL)
+    {
+        if (saveBig)
+    	    fputs ("# Default password\n", fp);
+    	sprintf (str, "password: %s\n", defpasswd);
+    	fputs (str, fp);
+    	if (saveBig)
+    	    fputs ("\n", fp);
+    }
+
     // Login
     if (login != NULL)
     {
@@ -2163,6 +2174,17 @@
     	    fputs ("\n", fp);
     }
 
+    // Metaserver
+    if ((adefault = stringDefault ("metaServer")) != 0)
+    {
+    	if (saveBig)
+    	    fputs ("# Metaserver(s)\n", fp);
+    	sprintf (str, "metaServer: %s\n", adefault);
+    	fputs (str, fp);
+    	if (saveBig)
+    	    fputs ("\n", fp);
+    }
+
     // keymap part
     // we're going to print only keymap that differs from standard one
     // we have to start from second key, because first one is space
@@ -2212,16 +2234,15 @@
         fputs ("\n", fp);
 
     // Ckeymap
-    if (saveBig && (adefault = stringDefault ("ckeymap")) != 0)
-        fputs ("# Control-key key mapping\n", fp);
-        
-    if (adefault)
+    if ((adefault = stringDefault ("ckeymap")) != 0)
     {
+        if (saveBig)
+            fputs ("# Control-key key mapping\n", fp);
         sprintf (str, "ckeymap: %s\n", adefault);
         fputs (str, fp);
+        if (saveBig)
+            fputs ("\n", fp);
     }
-    if (saveBig && adefault)
-        fputs ("\n", fp);
         
     // Let's print buttonmap
     str[0] = '\0';
@@ -2424,12 +2445,16 @@
         }
         sprintf (str, "playerList: %s\n", plistLayout);
         fputs (str, fp);
-
-        if (saveBig)
-            fputs ("\n", fp);
     }
-
+    // player2 list
+    if (strlen (plist2Layout) != 0)
+    {   
+        sprintf (str, "playerList2: %s\n", plist2Layout);
+        fputs (str, fp);
+    }
     fputs ("\n", fp);
+    if (saveBig)
+        fputs ("\n", fp);
 
     // Window placements
     if (saveWindow)
@@ -3328,8 +3353,9 @@
     if (saveBig)
     {
         fputs ("# Esoteric features such as individual ship rcfiles/keymaps\n", fp);
-        fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: <keymap>) and observer\n", fp);
-        fputs ("# /servertype options (i.e. keymap.bronco: <keymap>)\n", fp);
+        fputs ("# /ckeymaps/buttonmaps (i.e. keymap-ca: <keymap>), observer\n", fp);
+        fputs ("# /servertype options (i.e. keymap.bronco: <keymap>), and\n", fp);
+        fputs ("# button keymaps (b1keymap through b5keymap)\n", fp);
     }
     // Individual ship type settings
     for (j = NUM_TYPES; j >= 0; j--)
@@ -3391,6 +3417,38 @@
         }
         sl = sl->next;
     }
+    
+    // Button keymaps
+    adefault = stringDefault ("b1keymap");
+    if (adefault)
+    {
+        sprintf (str, "b1keymap: %s\n", adefault);
+        fputs (str, fp);
+    }
+    adefault = stringDefault ("b2keymap");
+    if (adefault)
+    {
+        sprintf (str, "b2keymap: %s\n", adefault);
+        fputs (str, fp);
+    }
+    adefault = stringDefault ("b3keymap");
+    if (adefault)
+    {
+        sprintf (str, "b3keymap: %s\n", adefault);
+        fputs (str, fp);
+    }
+    adefault = stringDefault ("b4keymap");
+    if (adefault)
+    {
+        sprintf (str, "b4keymap: %s\n", adefault);
+        fputs (str, fp);
+    }
+    adefault = stringDefault ("b5keymap");
+    if (adefault)
+    {
+        sprintf (str, "b5keymap: %s\n", adefault);
+        fputs (str, fp);
+    }
 
     fclose (fp);
 }
\ No newline at end of file