Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv20474/src Modified Files: local.c map.c mswindow.c option.c sound.c Log Message: Made showArmy default from 1 to 3 (show army count on all planets if feature enabled). Changed how phaser miss cases are handled - if server sends us the end coordinate (as it now does for sturgeon servers), draw misses based on that end coordinate. Fixes problems where upgraded ships were drawing wrong phaser length on a phaser miss. Remove resizable border from richtext window, as it added bulk and cut down text viewable area. Still can't figure out how to get the richtext windows to move, sadly. Fixed bug with login name capture via options menu. Changed default soundVolume setting if changed by user, so it saves properly. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- mswindow.c 10 Apr 2007 00:44:03 -0000 1.62 +++ mswindow.c 10 Apr 2007 05:43:45 -0000 1.63 @@ -1221,7 +1221,7 @@ if (window->type == WIN_RICHTEXT) { window->hwnd = CreateWindowEx (0, RICHEDIT_CLASS, "", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | WS_THICKFRAME | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE, actual_x, actual_y, actual_width, actual_height, parentwin->hwnd, NULL, MyInstance, (void *) window); Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- sound.c 6 Apr 2007 06:46:32 -0000 1.39 +++ sound.c 10 Apr 2007 05:43:45 -0000 1.40 @@ -437,6 +437,9 @@ if (mvolume < 0) mvolume = 0; Mix_VolumeMusic(mvolume); + + // Change default + soundVolume = volume; } /* Sound options window stuff */ Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- local.c 9 Apr 2007 02:52:31 -0000 1.90 +++ local.c 10 Apr 2007 05:43:44 -0000 1.91 @@ -1581,14 +1581,24 @@ if (php->ph_status == PHMISS) { /* Here I will have to compute end coordinate */ - tx = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * - Cos[php->ph_dir]); + /* Server will sometimes send us this information though, + so check if we have it first */ + if (php->ph_x > 0 && php->ph_y > 0) + { + tx = (php->ph_x - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (php->ph_y - me->p_y) / scaleFactor + TWINSIDE / 2; + } + else + { + tx = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * + Cos[php->ph_dir]); - ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * - Sin[php->ph_dir]); + ty = (int) (PHASEDIST * j->p_ship.s_phaserdamage / 100 * + Sin[php->ph_dir]); - tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; - ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; + tx = (j->p_x + tx - me->p_x) / scaleFactor + TWINSIDE / 2; + ty = (j->p_y + ty - me->p_y) / scaleFactor + TWINSIDE / 2; + } } else if (php->ph_status == PHHIT2) { Index: option.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/option.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- option.c 10 Apr 2007 01:14:32 -0000 1.46 +++ option.c 10 Apr 2007 05:43:45 -0000 1.47 @@ -1130,7 +1130,7 @@ *newbuttons = '\0'; /* update login */ - if (newlogin) + if (newlogin[0] != '\0') { STRNCPY (login, newlogin, PSEUDOSIZE); *newlogin = '\0'; Index: map.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/map.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- map.c 9 Apr 2007 02:52:31 -0000 1.47 +++ map.c 10 Apr 2007 05:43:45 -0000 1.48 @@ -1202,10 +1202,20 @@ { case PHMISS: /* Here I will have to compute end coordinate */ - tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; - ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 - * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; + /* Server will sometimes send us this information though, + so check if we have it first */ + if (ph->ph_x > 0 && ph->ph_y > 0) + { + tx = ph->ph_x * GWINSIDE / GWIDTH; + ty = ph->ph_y * GWINSIDE / GWIDTH; + } + else + { + tx = (int) (j->p_x + PHASEDIST * j->p_ship.s_phaserdamage / 100 + * Cos[ph->ph_dir]) * GWINSIDE / GWIDTH; + ty = (int) (j->p_y + PHASEDIST * j->p_ship.s_phaserdamage / 100 + * Sin[ph->ph_dir]) * GWINSIDE / GWIDTH; + } break; case PHHIT2: tx = ph->ph_x * GWINSIDE / GWIDTH;