diff -r -c -w mangband-014/ChangeLog mangband/ChangeLog *** mangband-014/ChangeLog Sun Apr 20 16:46:34 1997 --- mangband/ChangeLog Mon Apr 28 14:18:24 1997 *************** *** 1,4 **** --- 1,47 ---- + 04/28/97: + Fixed problem with "project()". Now player's magic missiles, etc. + don't pass through other players. In fact, they hurt those + players. + 04/27/97: + Messed with the message printing routines. They should be less + deadly and annoying now. + Finally implemented inscribing and uninscribing in the client. They + had been in the server since 0.1.0! + Reimplemented the usage of the {@#} feature in the macros, where # is + a digit. + Changed the color of messages sent by players to blue. + Made running more "correct" when slightly slowed. + + 04/26/97: + Added a Message of the Day feature. The server sends the contents + of its news.txt file to the client for display. This should + let server admins tell people about special things in their + server. + Fixed an annoying "can't-move-in-town" networking bug. + + 04/25/97: + Fixed bug causing SEGV when player dies in the dungeon (and he is also + the last person at that depth). + + 04/24/97: + Added patch from Donald Sharp to allow different blocks in the + .mangrc file to have different configurations for different + servers. + Increased radius of drops, so that players will drop most (if not all) + of their stuff on death. + + 04/22/97: + Included patch by Donald Sharp to implement server logging in + lib/xtra/mangband.log. + + 04/21/97: + The server now rejects clients that are too old, and the client will + recognize this, and tell the user to upgrade. Also, the client + prints out more intelligible messages on failure. + Fixed bug in the client networking code that only appeared on big + endian machines. + 04/20/97: ----- MAngband 0.1.4 released ----- diff -r -c -w mangband-014/README mangband/README *** mangband-014/README Sun Apr 20 17:00:07 1997 --- mangband/README Mon Apr 28 16:41:32 1997 *************** *** 1,7 **** ! This is the README file for MAngband 0.1.4 (4/20/97) ! MAngband 0.1.3 is an unstable release that is meant for testing purposes ! only. Any bugs found in MAngband 0.1.4 will be fixed in MAngband 0.2.0, the next public release. Send all bug reports to the mailing list at mangband@keldon.student.umr.edu. --- 1,7 ---- ! This is the README file for MAngband 0.1.5 (4/26/97) ! MAngband 0.1.5 is an unstable release that is meant for testing purposes ! only. Any bugs found in MAngband 0.1.5 will be fixed in MAngband 0.2.0, the next public release. Send all bug reports to the mailing list at mangband@keldon.student.umr.edu. *************** *** 8,19 **** Please remember to check the Bugs Page though, to avoid sending bug reports that I already know about. ! MAngband 0.1.4 isn't yet to a point where every feature that you've come to enjoy in Angband works. Things that don't work (that are hard to live without) are: * No targetting/looking * No stores ! * A few other commands (fire, throw, inscribe, uninscribe...) These are things that are new or that you should watch out for: * The ':' command sends a message to everyone else in the game --- 8,19 ---- Please remember to check the Bugs Page though, to avoid sending bug reports that I already know about. ! MAngband 0.1.5 isn't yet to a point where every feature that you've come to enjoy in Angband works. Things that don't work (that are hard to live without) are: * No targetting/looking * No stores ! * A few other commands (fire, throw...) These are things that are new or that you should watch out for: * The ':' command sends a message to everyone else in the game *************** *** 51,57 **** Make sure to edit the .mangrc file to set your race/class/sex/name. If you don't, you'll default to a Male Human Warrior named My Name. Also, make sure ! that your .mangrc file is in your home directory. If you are only going to use the client, the "lib" directories do not need to be installed anywhere. However, to use the "pref files", you must install --- 51,58 ---- Make sure to edit the .mangrc file to set your race/class/sex/name. If you don't, you'll default to a Male Human Warrior named My Name. Also, make sure ! that your .mangrc file is in your home directory. Read README.mangrc for ! lots more info on setting up that file. If you are only going to use the client, the "lib" directories do not need to be installed anywhere. However, to use the "pref files", you must install Only in mangband: README.mangrc Common subdirectories: mangband-014/lib and mangband/lib Only in mangband: mangband Only in mangband: mangclient diff -r -c -w mangband-014/mangrc mangband/mangrc *** mangband-014/mangrc Fri Apr 11 21:35:50 1997 --- mangband/mangrc Sat Apr 26 15:23:25 1997 *************** *** 1,9 **** ! # MAngband client configuration file # Copy this file to your home directory and call it ".mangrc" after editing # it. ! # These lines MUST begin on column one # Pick a name. Spaces are allowed. The name should be no longer than 15 # characters and shouldn't contain any "special" characters. --- 1,21 ---- ! # MAngband client configuration file (for 0.1.5 and later) ! # Copy this file to your home directory and call it ".mangrc" after editing # it. ! # This file consists of "blocks" of information that are used for each ! # server. You can have a "default" that is used if no other block matches ! # a server name. + # If you want a different set of information for a certain server, place + # another block of info around here. + + + + # Note that the default block should appear after all other blocks. + + server default + # Pick a name. Spaces are allowed. The name should be no longer than 15 # characters and shouldn't contain any "special" characters. *************** *** 34,37 **** --- 46,55 ---- # 0 - Female 1 - Male sex 1 + + + # This marks the end of a server block + + end + # (End of default block) Common subdirectories: mangband-014/src and mangband/src Common subdirectories: mangband-014/lib/apex and mangband/lib/apex Common subdirectories: mangband-014/lib/bone and mangband/lib/bone Common subdirectories: mangband-014/lib/data and mangband/lib/data Common subdirectories: mangband-014/lib/edit and mangband/lib/edit Common subdirectories: mangband-014/lib/file and mangband/lib/file Common subdirectories: mangband-014/lib/help and mangband/lib/help Common subdirectories: mangband-014/lib/info and mangband/lib/info Common subdirectories: mangband-014/lib/save and mangband/lib/save Common subdirectories: mangband-014/lib/user and mangband/lib/user Common subdirectories: mangband-014/lib/xtra and mangband/lib/xtra Only in mangband/lib/data: a_info.raw Only in mangband/lib/data: e_info.raw Only in mangband/lib/data: f_info.raw Only in mangband/lib/data: k_info.raw Only in mangband/lib/data: r_info.raw Only in mangband/lib/data: v_info.raw diff -r -c -w mangband-014/lib/edit/a_info.txt mangband/lib/edit/a_info.txt *** mangband-014/lib/edit/a_info.txt Wed Apr 16 22:48:03 1997 --- mangband/lib/edit/a_info.txt Sat Apr 26 15:08:58 1997 *************** *** 21,27 **** # Version stamp (required) ! V:0.1.4 --- 21,27 ---- # Version stamp (required) ! V:0.1.5 diff -r -c -w mangband-014/lib/edit/e_info.txt mangband/lib/edit/e_info.txt *** mangband-014/lib/edit/e_info.txt Wed Apr 16 22:48:08 1997 --- mangband/lib/edit/e_info.txt Sat Apr 26 15:09:02 1997 *************** *** 22,28 **** # Version stamp (required) ! V:0.1.4 ### Body Armor ### --- 22,28 ---- # Version stamp (required) ! V:0.1.5 ### Body Armor ### diff -r -c -w mangband-014/lib/edit/f_info.txt mangband/lib/edit/f_info.txt *** mangband-014/lib/edit/f_info.txt Wed Apr 16 22:48:13 1997 --- mangband/lib/edit/f_info.txt Sat Apr 26 15:09:07 1997 *************** *** 17,23 **** # Version stamp (required) ! V:0.1.4 # 0x00 --> nothing --- 17,23 ---- # Version stamp (required) ! V:0.1.5 # 0x00 --> nothing diff -r -c -w mangband-014/lib/edit/k_info.txt mangband/lib/edit/k_info.txt *** mangband-014/lib/edit/k_info.txt Wed Apr 16 22:48:18 1997 --- mangband/lib/edit/k_info.txt Sat Apr 26 15:09:12 1997 *************** *** 24,30 **** # Version stamp (required) ! V:0.1.4 ##### Something special ##### --- 24,30 ---- # Version stamp (required) ! V:0.1.5 ##### Something special ##### diff -r -c -w mangband-014/lib/edit/r_info.txt mangband/lib/edit/r_info.txt *** mangband-014/lib/edit/r_info.txt Wed Apr 16 22:48:26 1997 --- mangband/lib/edit/r_info.txt Sat Apr 26 15:09:18 1997 *************** *** 109,115 **** # Version stamp (required) ! V:0.1.4 ##### The Player ##### --- 109,115 ---- # Version stamp (required) ! V:0.1.5 ##### The Player ##### diff -r -c -w mangband-014/lib/edit/v_info.txt mangband/lib/edit/v_info.txt *** mangband-014/lib/edit/v_info.txt Wed Apr 16 22:48:32 1997 --- mangband/lib/edit/v_info.txt Sat Apr 26 15:09:23 1997 *************** *** 14,20 **** # Version stamp (required) ! V:0.1.4 ### Simple Vaults (type 7) -- maximum size 44x22 ### --- 14,20 ---- # Version stamp (required) ! V:0.1.5 ### Simple Vaults (type 7) -- maximum size 44x22 ### diff -r -c -w mangband-014/lib/file/news.txt mangband/lib/file/news.txt *** mangband-014/lib/file/news.txt Wed Apr 16 22:49:53 1997 --- mangband/lib/file/news.txt Sat Apr 26 15:17:23 1997 *************** *** 1,7 **** - - ********************** ! ** MAngband 0.1.4 ** ********************** Based on Moria: Copyright (c) 1985 Robert Alan Koeneke --- 1,5 ---- ********************** ! ** MAngband 0.1.5 ** ********************** Based on Moria: Copyright (c) 1985 Robert Alan Koeneke *************** *** 17,24 **** MAngband 0.1 - ??: Keldon Jones (keldon@umr.edu) ! MAngband 0.1.4 is only available for Unix/Linux and other Unix-ish machines, ! though a DOS port is coming along and may be available very soon. Visit the MAngband Home Page at "http://www.umr.edu/~keldon/mangband/". Send all comments, bug reports, patches, etc, to "keldon@umr.edu". --- 15,23 ---- MAngband 0.1 - ??: Keldon Jones (keldon@umr.edu) ! MAngband 0.1.5 is only available for Unix/Linux and other Unix-ish machines. ! But, a Windows port seems to be nearly done, but ask Garret Pease about it ! for more information. Visit the MAngband Home Page at "http://www.umr.edu/~keldon/mangband/". Send all comments, bug reports, patches, etc, to "keldon@umr.edu". Only in mangband/lib/save: MY Only in mangband/lib/xtra: mangband.log diff -r -c -w mangband-014/src/Makefile mangband/src/Makefile *** mangband-014/src/Makefile Thu Apr 3 17:56:19 1997 --- mangband/src/Makefile Tue Apr 29 14:51:09 1997 *************** *** 56,62 **** server/cmd1.c server/cmd2.c server/cmd3.c server/cmd4.c server/cmd5.c \ server/cmd6.c server/store.c server/birth.c server/load2.c \ server/sched.c server/generate.c server/dungeon.c server/init1.c \ ! server/init2.c server/netserver.c server/main.c SERV_OBJS = \ common/z-util.o common/z-virt.o common/z-form.o common/z-rand.o \ --- 56,62 ---- server/cmd1.c server/cmd2.c server/cmd3.c server/cmd4.c server/cmd5.c \ server/cmd6.c server/store.c server/birth.c server/load2.c \ server/sched.c server/generate.c server/dungeon.c server/init1.c \ ! server/init2.c server/netserver.c server/printout.c server/main.c SERV_OBJS = \ common/z-util.o common/z-virt.o common/z-form.o common/z-rand.o \ *************** *** 68,74 **** server/cmd1.o server/cmd2.o server/cmd3.o server/cmd4.o server/cmd5.o \ server/cmd6.o server/store.o server/birth.o server/load2.o \ server/sched.o server/generate.o server/dungeon.o server/init1.o \ ! server/init2.o server/netserver.o server/main.o CLI_SRCS = \ --- 68,74 ---- server/cmd1.o server/cmd2.o server/cmd3.o server/cmd4.o server/cmd5.o \ server/cmd6.o server/store.o server/birth.o server/load2.o \ server/sched.o server/generate.o server/dungeon.o server/init1.o \ ! server/init2.o server/netserver.o server/printout.o server/main.o CLI_SRCS = \ *************** *** 138,147 **** # including "USE_GETCH" and "USE_CURS_SET". Note that "config.h" will # attempt to "guess" at many of these flags based on your system. # ! CFLAGS = -Wall -g -pipe -D"USE_X11" -D"USE_GCU" -I/usr/include/ncurses ! LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap ## ## Variation -- Only support "main-x11.c" (not "main-gcu.c") ## --- 138,150 ---- # including "USE_GETCH" and "USE_CURS_SET". Note that "config.h" will # attempt to "guess" at many of these flags based on your system. # ! CFLAGS = -Wall -g -pipe -D"USE_GCU" \ ! -DSTDVA -DSOLARIS ! LIBS = -lcurses -ltermcap -lsocket + #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap + ## ## Variation -- Only support "main-x11.c" (not "main-gcu.c") ## Common subdirectories: mangband-014/src/client and mangband/src/client Common subdirectories: mangband-014/src/common and mangband/src/common Common subdirectories: mangband-014/src/server and mangband/src/server diff -r -c -w mangband-014/src/client/c-cmd.c mangband/src/client/c-cmd.c *** mangband-014/src/client/c-cmd.c Sat Apr 19 23:17:20 1997 --- mangband/src/client/c-cmd.c Sun Apr 27 16:41:22 1997 *************** *** 152,157 **** --- 152,169 ---- break; } + case '{': + { + cmd_inscribe(); + break; + } + + case '}': + { + cmd_uninscribe(); + break; + } + /*** Inventory "usage" commands ***/ case 'q': { *************** *** 517,523 **** --- 529,565 ---- } + void cmd_inscribe(void) + { + int item; + char buf[1024]; + if (!c_get_item(&item, "Inscribe what? ", TRUE, TRUE, FALSE)) + { + return; + } + + buf[0] = '\0'; + + /* Get an inscription */ + if (get_string("Inscription: ", buf, 59)) + Send_inscribe(item, buf); + } + + void cmd_uninscribe(void) + { + int item; + + if (!c_get_item(&item, "Uninscribe what? ", TRUE, TRUE, FALSE)) + { + return; + } + + /* Send it */ + Send_uninscribe(item); + } + + void cmd_quaff(void) { int item; Only in mangband/src/client: c-cmd.o diff -r -c -w mangband-014/src/client/c-files.c mangband/src/client/c-files.c *** mangband-014/src/client/c-files.c Thu Apr 3 20:04:10 1997 --- mangband/src/client/c-files.c Sun Apr 27 17:41:35 1997 *************** *** 626,632 **** */ errr process_pref_file_aux(char *buf) { ! int i, j, k, n1, n2; char *zz[16]; --- 626,632 ---- */ errr process_pref_file_aux(char *buf) { ! int i, j, k; char *zz[16]; *************** *** 903,907 **** --- 903,934 ---- } + /* + * Show the Message of the Day. + * + * It is given in the "Setup" info sent by the server. + */ + void show_motd(void) + { + int i; + char ch; + /* Clear the screen */ + Term_clear(); + + for (i = 0; i < 23; i++) + { + /* Show each line */ + Term_putstr(0, i, -1, TERM_WHITE, &Setup.motd[i * 80]); + } + + /* Show it */ + Term_fresh(); + + /* Wait for a keypress */ + Term_inkey(&ch, TRUE, TRUE); + + /* Clear the screen again */ + Term_clear(); + } Only in mangband/src/client: c-files.o diff -r -c -w mangband-014/src/client/c-inven.c mangband/src/client/c-inven.c *** mangband-014/src/client/c-inven.c Sun Mar 23 16:23:40 1997 --- mangband/src/client/c-inven.c Sun Apr 27 16:54:42 1997 *************** *** 104,110 **** --- 104,171 ---- } + /* + * Find the "first" inventory object with the given "tag". + * + * A "tag" is a char "n" appearing as "@n" anywhere in the + * inscription of an object. + * + * Also, the tag "@xn" will work as well, where "n" is a tag-char, + * and "x" is the "current" command_cmd code. + */ + static int get_tag(int *cp, char tag) + { + int i; + cptr s; + + /* Check every object */ + for (i = 0; i < INVEN_TOTAL; ++i) + { + char *buf = inventory_name[i]; + char *buf2; + + /* Skip empty objects */ + if (!buf[0]) continue; + + /* Skip empty inscriptions */ + if (!(buf2 = strchr(buf, '{'))) continue; + + /* Find a '@' */ + s = strchr(buf2, '@'); + + /* Process all tags */ + while (s) + { + /* Check the normal tags */ + if (s[1] == tag) + { + /* Save the actual inventory ID */ + *cp = i; + + /* Success */ + return (TRUE); + } + + /* Check the special tags */ + if ((s[1] == command_cmd) && (s[2] == tag)) + { + /* Save the actual inventory ID */ + *cp = i; + + /* Success */ + return (TRUE); + } + + /* Find another '@' */ + s = strchr(s + 1, '@'); + } + } + + /* No such tag */ + return (FALSE); + } + bool c_get_item(int *cp, cptr pmt, bool equip, bool inven, bool floor) { char n1, n2, which = ' '; *************** *** 340,346 **** break; } - #if 0 case '0': case '1': case '2': case '3': case '4': case '5': case '6': --- 401,406 ---- *************** *** 367,377 **** --- 427,439 ---- break; } + #if 0 if (!get_item_allow(k)) { done = TRUE; break; } + #endif /* Use that item */ (*cp) = k; *************** *** 379,385 **** done = TRUE; break; } - #endif case '\n': case '\r': --- 441,446 ---- Only in mangband/src/client: c-inven.o Only in mangband/src/client: c-spell.o Only in mangband/src/client: c-tables.o diff -r -c -w mangband-014/src/client/c-util.c mangband/src/client/c-util.c *** mangband-014/src/client/c-util.c Thu Apr 3 21:01:21 1997 --- mangband/src/client/c-util.c Mon Apr 28 15:58:24 1997 *************** *** 1001,1006 **** --- 1001,1009 ---- { bool res; + /* The top line is "icky" */ + topline_icky = TRUE; + /* Display prompt */ prt(prompt, 0, 0); *************** *** 1010,1015 **** --- 1013,1024 ---- /* Clear prompt */ prt("", 0, 0); + /* The top line is OK again */ + topline_icky = FALSE; + + /* Flush any events */ + Flush_queue(); + /* Result */ return (res); } *************** *** 1198,1203 **** --- 1207,1215 ---- /* Hack -- Build a "useful" prompt */ strnfmt(buf, 78, "%.70s[y/n] ", prompt); + /* The top line is "icky" */ + topline_icky = TRUE; + /* Prompt for it */ prt(buf, 0, 0); *************** *** 1214,1219 **** --- 1226,1237 ---- /* Erase the prompt */ prt("", 0, 0); + /* The top line is OK again */ + topline_icky = FALSE; + + /* Flush any events that came in while we were icky */ + Flush_queue(); + /* Normal negation */ if ((i != 'Y') && (i != 'y')) return (FALSE); *************** *** 1446,1452 **** --- 1464,1473 ---- /* * Hack -- flush + * + * Not needed --KLJ-- */ + #if 0 static void msg_flush(int x) { byte a = TERM_L_BLUE; *************** *** 1472,1479 **** --- 1493,1502 ---- /* The top line is OK */ topline_icky = FALSE; + Flush_queue(); } + #endif /* *************** *** 1515,1520 **** --- 1538,1547 ---- /* Hack -- Reset */ if (!msg_flag) p = 0; + /* Keldon-Hack -- Always reset */ + p = 0; + prt("", 0, 0); + /* Message length */ n = (msg ? strlen(msg) : 0); *************** *** 1522,1528 **** if (p && (!msg || ((p + n) > 72))) { /* Flush */ ! msg_flush(p); /* Forget it */ msg_flag = FALSE; --- 1549,1555 ---- if (p && (!msg || ((p + n) > 72))) { /* Flush */ ! /*msg_flush(p);*/ /* Forget it */ msg_flag = FALSE; *************** *** 1576,1582 **** Term_putstr(0, 0, split, TERM_WHITE, t); /* Flush it */ ! msg_flush(split + 1); /* Restore the split character */ t[split] = oops; --- 1603,1609 ---- Term_putstr(0, 0, split, TERM_WHITE, t); /* Flush it */ ! /*msg_flush(split + 1);*/ /* Restore the split character */ t[split] = oops; Only in mangband/src/client: c-util.o diff -r -c -w mangband-014/src/client/c-xtra1.c mangband/src/client/c-xtra1.c *** mangband-014/src/client/c-xtra1.c Thu Apr 3 22:17:49 1997 --- mangband/src/client/c-xtra1.c Sun Apr 27 17:37:41 1997 *************** *** 747,754 **** /* Dump messages */ for (i = 0; i < h; i++) { /* Dump the message on the appropriate line */ ! Term_putstr(0, (h - 1) - i, -1, TERM_WHITE, message_str(i)); /* Cursor */ Term_locate(&x, &y); --- 747,763 ---- /* Dump messages */ for (i = 0; i < h; i++) { + byte a; + cptr msg; + + msg = message_str(i); + + if (msg[0] == '[') + a = TERM_L_BLUE; + else a = TERM_WHITE; + /* Dump the message on the appropriate line */ ! Term_putstr(0, (h - 1) - i, -1, a, msg); /* Cursor */ Term_locate(&x, &y); Only in mangband/src/client: c-xtra1.o diff -r -c -w mangband-014/src/client/c-xtra2.c mangband/src/client/c-xtra2.c *** mangband-014/src/client/c-xtra2.c Mon Mar 24 09:09:28 1997 --- mangband/src/client/c-xtra2.c Sun Apr 27 17:37:51 1997 *************** *** 60,65 **** --- 60,69 ---- /* Handle "shower" */ if (shower[0] && strstr(str, shower)) a = TERM_YELLOW; + /* Handle message from other player */ + if (str[0] == '[') + a = TERM_L_BLUE; + /* Dump the messages, bottom to top */ Term_putstr(0, 21-j, -1, a, str); } Only in mangband/src/client: c-xtra2.o diff -r -c -w mangband-014/src/client/client.c mangband/src/client/client.c *** mangband-014/src/client/client.c Mon Apr 7 21:11:12 1997 --- mangband/src/client/client.c Sun Apr 27 17:21:22 1997 *************** *** 162,168 **** } /* Set the timeout on the network socket */ ! SetTimeout(0, 100000); /* Only take input if we got some */ if (SocketReadable(netfd)) --- 162,168 ---- } /* Set the timeout on the network socket */ ! SetTimeout(0, 1000000 / Setup.frames_per_second); /* Only take input if we got some */ if (SocketReadable(netfd)) *************** *** 209,258 **** } } ! ! int main(int argc, char **argv) { ! sockbuf_t ibuf; ! unsigned magic = 12345; ! unsigned char reply_to, status; ! int login_port; ! int bytes; ! bool done = FALSE; ! struct passwd *pw; ! int player_uid; ! char real_name[17]; ! char host_name[80], server_name[80]; ! char buf[1024]; ! char pass[20]; ! char config_name[100]; ! FILE *config; ! unsigned int version = MY_VERSION; ! s32b temp; ! if (argc != 2) { ! printf("Usage: mangclient \n"); ! exit(1); ! } ! /* Save the program name */ ! argv0 = argv[0]; ! /* Setup the file paths */ ! init_stuff(); ! ! player_uid = getuid(); ! ! if ((pw = getpwuid(player_uid))) { ! strcpy(real_name, pw->pw_name); ! real_name[16] = '\0'; } - else strcpy(real_name, "PLAYER"); ! GetLocalHostName(host_name, 80); /* Try to find the home directory */ if (getenv("HOME")) strcpy(config_name, getenv("HOME")); --- 209,261 ---- } } ! static int read_til_correct_server_name(FILE *config, char *server_name) { ! char *isserverline; ! char *s_name; ! int looking_for_end = FALSE; ! char buff[1024]; ! while(!feof(config)) { ! fgets(buff, 1024, config); ! isserverline = strtok(buff," \t\n"); ! /* Make sure the string exists */ ! if (isserverline == NULL) ! continue; ! if(!looking_for_end) ! { ! if(strcmp(isserverline,"server") == 0) { ! s_name = strtok(NULL," \t\n"); ! if(strcmp(s_name,server_name) == 0) ! return(TRUE); ! if(strcmp(s_name, "default") == 0) ! return(TRUE); ! looking_for_end = TRUE; ! } ! /* ! else ! looking_for_end = TRUE; ! */ ! } ! else if( strcmp( isserverline,"end") == 0) ! looking_for_end = FALSE; ! } ! quit("Your .mangrc file is obsolete. Read README.mangrc."); ! ! return(FALSE); } ! static void read_mangrc_file( char *server_name, char *pass, char *real_name) ! { ! char config_name[100]; ! FILE *config; ! char buf[1024]; /* Try to find the home directory */ if (getenv("HOME")) strcpy(config_name, getenv("HOME")); *************** *** 268,275 **** strcat(config_name, "/.mangrc"); #endif ! ! if ((config = fopen(config_name, "r"))) { while (!feof(config)) { --- 271,278 ---- strcat(config_name, "/.mangrc"); #endif ! if ((config = fopen(config_name, "r")) && ! (read_til_correct_server_name(config,server_name))) { while (!feof(config)) { *************** *** 278,295 **** continue; if (!strncmp(buf, "nick", 4)) { ! /*sscanf(buf, "nick %s", nick);*/ ! strncpy(nick, &buf[5], 79); ! /* Trim the '\n' off the end */ ! nick[strlen(nick) - 1] = '\0'; } if (!strncmp(buf, "pass", 4)) { ! strncpy(pass, &buf[5], 16); ! /* Trim the '\n' off the end */ ! pass[strlen(pass) - 1] = '\0'; } if (!strncmp(buf, "race", 4)) sscanf(buf, "race %hd", &race); --- 281,301 ---- continue; if (!strncmp(buf, "nick", 4)) { ! char *name; ! name = strtok(buf," \t\n"); ! name = strtok(NULL," \t\n"); ! ! strcpy(nick,name); } if (!strncmp(buf, "pass", 4)) { ! char *p; ! p = strtok(buf," \t\n"); ! p = strtok(NULL," \t\n"); ! ! strcpy(pass,p); } if (!strncmp(buf, "race", 4)) sscanf(buf, "race %hd", &race); *************** *** 313,322 **** strcpy(nick, "PLAYER"); if (!strlen(pass)) strcpy(pass, nick); ! /* Capitalize the name */ ! nick[0] = toupper(nick[0]); /* Set the server's name */ strcpy(server_name, argv[1]); --- 319,367 ---- strcpy(nick, "PLAYER"); if (!strlen(pass)) strcpy(pass, nick); + } ! int main(int argc, char **argv) ! { ! sockbuf_t ibuf; ! unsigned magic = 12345; ! unsigned char reply_to, status; ! int login_port; ! int bytes; ! bool done = FALSE; ! struct passwd *pw; ! int player_uid; ! char real_name[17]; ! char host_name[80], server_name[80]; ! char pass[20]; ! unsigned int version = MY_VERSION; ! s32b temp; + if (argc != 2) + { + printf("Usage: mangclient \n"); + exit(1); + } + + /* Save the program name */ + argv0 = argv[0]; + + /* Setup the file paths */ + init_stuff(); + + + player_uid = getuid(); + + if ((pw = getpwuid(player_uid))) + { + strcpy(real_name, pw->pw_name); + + real_name[16] = '\0'; + } + else strcpy(real_name, "PLAYER"); + + GetLocalHostName(host_name, 80); + /* Set the server's name */ strcpy(server_name, argv[1]); *************** *** 324,329 **** --- 369,380 ---- if (!strcmp(server_name, "localhost")) strcpy(server_name, host_name); + /* Read in the user name and password */ + read_mangrc_file(server_name,pass,real_name); + + /* Capitalize the name */ + nick[0] = toupper(nick[0]); + if ((Socket = CreateDgramSocket(0)) == -1) { printf("Could not create Dgram socket\n"); *************** *** 382,388 **** --- 433,460 ---- if (status) { + /* The server didn't like us.... */ + switch (status) + { + case E_VERSION: + plog("This version of the client will not work with that server."); + plog("Upgrade immediately to use this server."); + break; + case E_GAME_FULL: + plog("Sorry, the game is full. Try again later."); + break; + case E_IN_USE: + plog("That nickname is already in use. If it is your nickname,"); + plog("wait 30 seconds and try again."); + break; + case E_INVAL: + plog("The server didn't like your nickname, realname, or hostname."); + break; + default: plog(format("Connection failed with status %d.", status)); + break; + } + Net_cleanup(); exit (1); } *************** *** 485,493 **** /* Hack -- Default window usage */ window_flag[1] = PW_MESSAGE; Input_loop(); Net_cleanup(); ! exit (0); } --- 557,568 ---- /* Hack -- Default window usage */ window_flag[1] = PW_MESSAGE; + /* Show the MOTD */ + show_motd(); + Input_loop(); Net_cleanup(); ! quit(NULL); } Only in mangband/src/client: client.o diff -r -c -w mangband-014/src/client/externs.h mangband/src/client/externs.h *** mangband-014/src/client/externs.h Thu Apr 3 20:25:31 1997 --- mangband/src/client/externs.h Sun Apr 27 17:44:35 1997 *************** *** 30,35 **** --- 30,37 ---- extern char spell_info[9][9][80]; + extern setup_t Setup; + extern s16b command_see; extern s16b command_gap; extern s16b command_wrk; *************** *** 189,194 **** --- 191,198 ---- extern void cmd_wield(void); extern void cmd_take_off(void); extern void cmd_destroy(void); + extern void cmd_inscribe(void); + extern void cmd_uninscribe(void); extern void cmd_quaff(void); extern void cmd_read_scroll(void); extern void cmd_aim_wand(void); *************** *** 206,211 **** --- 210,216 ---- /* c-files.c */ extern void init_file_paths(char *path); extern errr process_pref_file(cptr buf); + extern void show_motd(void); /* c-inven.c */ extern s16b index_to_label(int i); *************** *** 231,236 **** --- 236,243 ---- extern cptr message_str(s16b age); extern void c_msg_print(cptr msg); extern s16b c_get_quantity(cptr prompt, int max); + extern errr path_build(char *buf, int max, cptr path, cptr file); + extern bool askfor_aux(char *buf, int len); /* c-spell.c */ extern void show_browse(int book); *************** *** 294,299 **** --- 301,308 ---- extern int Send_wield(int item); extern int Send_take_off(int item); extern int Send_destroy(int item, int amt); + extern int Send_inscribe(int item, cptr buf); + extern int Send_uninscribe(int item); extern int Send_quaff(int item); extern int Send_read(int item); extern int Send_aim(int item, int dir); Only in mangband/src/client: main-cap.o diff -r -c -w mangband-014/src/client/main-gcu.c mangband/src/client/main-gcu.c *** mangband-014/src/client/main-gcu.c Fri Mar 14 14:08:36 1997 --- mangband/src/client/main-gcu.c Tue Apr 29 14:50:24 1997 *************** *** 50,56 **** * Include the proper "header" file */ #ifdef USE_NCURSES ! # include #else # include #endif --- 50,56 ---- * Include the proper "header" file */ #ifdef USE_NCURSES ! # include #else # include #endif Only in mangband/src/client: main-gcu.o Only in mangband/src/client: main-ibm.o Only in mangband/src/client: main-x11.o Only in mangband/src/client: main-xaw.o diff -r -c -w mangband-014/src/client/netclient.c mangband/src/client/netclient.c *** mangband-014/src/client/netclient.c Tue Apr 22 11:28:11 1997 --- mangband/src/client/netclient.c Sun Apr 27 18:00:28 1997 *************** *** 20,26 **** last_keyboard_change, last_keyboard_ack, reliable_offset, ! reliable_full_len; /* * Initialize the function dispatch tables. --- 20,27 ---- last_keyboard_change, last_keyboard_ack, reliable_offset, ! reliable_full_len, ! latest_reliable; /* * Initialize the function dispatch tables. *************** *** 80,93 **** reliable_tbl[PKT_FLUSH] = Receive_flush; reliable_tbl[PKT_LINE_INFO] = Receive_line_info; reliable_tbl[PKT_FLOOR] = Receive_floor; } int Net_setup(void) { ! /* I don't know of anything that should be done here */ ! return 1; } /* * Send the first packet to the server with our name, * nick and display contained in it. --- 81,189 ---- reliable_tbl[PKT_FLUSH] = Receive_flush; reliable_tbl[PKT_LINE_INFO] = Receive_line_info; reliable_tbl[PKT_FLOOR] = Receive_floor; + reliable_tbl[PKT_MISC_LINE] = Receive_misc_line; } int Net_setup(void) { ! int n, len, done = 0, retries; ! long todo = sizeof(setup_t); ! char *ptr; ! ! ptr = (char *) &Setup; ! ! while (todo > 0) ! { ! if (cbuf.ptr != cbuf.buf) ! Sockbuf_advance(&cbuf, cbuf.ptr - cbuf.buf); ! ! len = cbuf.len; ! if (len > todo) ! len = todo; ! ! if (len > 0) ! { ! if (done == 0) ! { ! n = Packet_scanf(&cbuf, "%ld%hd", ! &Setup.motd_len, &Setup.frames_per_second); ! if (n <= 0) ! { ! errno = 0; ! quit("Can't read setup info from reliable data buffer"); } + ptr = (char *) &Setup; + done = (char *) &Setup.motd[0] - ptr; + todo = Setup.motd_len; + } + else + { + memcpy(&ptr[done], cbuf.ptr, len); + Sockbuf_advance(&cbuf, len + cbuf.ptr - cbuf.buf); + done += len; + todo -= len; + } + } + if (todo > 0) + { + if (rbuf.ptr != rbuf.buf) + Sockbuf_advance(&rbuf, rbuf.ptr - rbuf.buf); + if (rbuf.len > 0) + { + if (rbuf.ptr[0] != PKT_RELIABLE) + { + if (rbuf.ptr[0] == PKT_QUIT) + { + quit("Server closed connection"); + } + else + { + errno = 0; + quit_fmt("Not a reliable packet (%d) in setup", rbuf.ptr[0]); + } + } + if (Receive_reliable() == -1) + return -1; + if (Sockbuf_flush(&wbuf) == -1) + return -1; + } + + if (cbuf.ptr != cbuf.buf) + Sockbuf_advance(&cbuf, cbuf.ptr - cbuf.buf); + + if (cbuf.len > 0) + continue; + + for (retries = 0;;retries++) + { + if (retries >= 10) + { + errno = 0; + quit_fmt("Can't read setup after %d retries " + "(todo=%d, left=%d)", + retries, todo, cbuf.len - (cbuf.ptr - cbuf.buf)); + } + + SetTimeout(2, 0); + while (SocketReadable(rbuf.sock) > 0) + { + Sockbuf_clear(&rbuf); + if (Sockbuf_read(&rbuf) == -1) + quit("Can't read all of setup data"); + if (rbuf.len > 0) + break; + SetTimeout(0, 0); + } + if (rbuf.len > 0) + break; + } + } + } + + return 0; + } + /* * Send the first packet to the server with our name, * nick and display contained in it. *************** *** 752,759 **** } /* Track maximum full length */ ! if (full_len > reliable_full_len) reliable_full_len = full_len; if (rbuf.ptr + len > rbuf.buf + rbuf.len) { --- 848,858 ---- } /* Track maximum full length */ ! if (full_len > reliable_full_len || rel_loops > latest_reliable) ! { reliable_full_len = full_len; + latest_reliable = rel_loops; + } if (rbuf.ptr + len > rbuf.buf + rbuf.len) { *************** *** 841,847 **** if (Packet_scanf(sbuf, "%s", reason) <= 0) strcpy(reason, "unknown reason"); errno = 0; ! plog(format("Quitting: %s", reason)); } return -1; } --- 940,946 ---- if (Packet_scanf(sbuf, "%s", reason) <= 0) strcpy(reason, "unknown reason"); errno = 0; ! quit(format("Quitting: %s", reason)); } return -1; } *************** *** 1563,1569 **** --- 1662,1680 ---- return 1; } + int Receive_misc_line(void) + { + int n; + char ch; + if ((n = Packet_scanf(&cbuf, "%c", &ch)) <= 0) + { + return n; + } + + return 1; + } + int Send_search(void) { int n; *************** *** 1751,1756 **** --- 1862,1891 ---- if ((n = Packet_printf(&wbuf, "%c%hd%hd", PKT_DESTROY, item, amt)) <= 0) { return n; + } + + return 1; + } + + int Send_inscribe(int item, cptr buf) + { + int n; + + if ((n = Packet_printf(&wbuf, "%c%hd%s", PKT_INSCRIBE, item, buf)) <= 0) + { + return n; + } + + return 1; + } + + int Send_uninscribe(int item) + { + int n; + + if ((n = Packet_printf(&wbuf, "%c%hd", PKT_UNINSCRIBE, item)) <= 0) + { + return n; } return 1; diff -r -c -w mangband-014/src/client/netclient.h mangband/src/client/netclient.h *** mangband-014/src/client/netclient.h Sun Apr 20 16:28:41 1997 --- mangband/src/client/netclient.h Sun Apr 27 18:06:49 1997 *************** *** 52,55 **** --- 52,56 ---- int Receive_flush(void); int Receive_line_info(void); int Receive_floor(void); + int Receive_misc_line(void); Only in mangband/src/client: netclient.o diff -r -c -w mangband-014/src/client/variable.c mangband/src/client/variable.c *** mangband-014/src/client/variable.c Thu Apr 3 20:26:47 1997 --- mangband/src/client/variable.c Sat Apr 26 14:02:07 1997 *************** *** 9,14 **** --- 9,16 ---- char spell_info[9][9][80]; /* Spell information */ + setup_t Setup; /* The information given to us by the server */ + s16b command_see; s16b command_gap; s16b command_wrk; Only in mangband/src/client: variable.o Only in mangband/src/client: z-term.o diff -r -c -w mangband-014/src/common/defines.h mangband/src/common/defines.h *** mangband-014/src/common/defines.h Sun Apr 20 16:50:59 1997 --- mangband/src/common/defines.h Mon Apr 28 16:49:12 1997 *************** *** 33,43 **** /* ! * Current version number of MAngband: 0.1.4 */ #define VERSION_MAJOR 0 #define VERSION_MINOR 1 ! #define VERSION_PATCH 4 /* * This value specifys the suffix to the version info sent to the metaserver. --- 33,43 ---- /* ! * Current version number of MAngband: 0.1.5 */ #define VERSION_MAJOR 0 #define VERSION_MINOR 1 ! #define VERSION_PATCH 5 /* * This value specifys the suffix to the version info sent to the metaserver. Only in mangband/src/common: net-ibm.o Only in mangband/src/common: net-unix.o diff -r -c -w mangband-014/src/common/pack.h mangband/src/common/pack.h *** mangband-014/src/common/pack.h Sun Apr 20 16:26:34 1997 --- mangband/src/common/pack.h Sat Apr 26 12:35:16 1997 *************** *** 51,56 **** --- 51,57 ---- #define PKT_CHAR 47 #define PKT_SPELL_INFO 48 #define PKT_FLOOR 49 + #define PKT_MISC_LINE 50 /* Packet types 60-61 are sent from either the client or server */ *************** *** 116,121 **** --- 117,123 ---- * Possible error codes returned */ #define SUCCESS 0x00 + #define E_VERSION 0x01 #define E_GAME_FULL 0x02 #define E_IN_USE 0x08 #define E_SOCKET 0x09 Only in mangband/src/common: sockbuf.o diff -r -c -w mangband-014/src/common/types.h mangband/src/common/types.h *** mangband-014/src/common/types.h Fri Apr 18 23:08:01 1997 --- mangband/src/common/types.h Sat Apr 26 14:03:06 1997 *************** *** 600,606 **** --- 600,620 ---- }; + /* + * The setup data that the server transmits to the + * client. + */ + typedef struct setup_t setup_t; + struct setup_t + { + int frames_per_second; + int motd_len; + int setup_size; + char motd[80 * 23]; + }; + + /* * Available "options" * Only in mangband/src/common: z-form.o Only in mangband/src/common: z-rand.o Only in mangband/src/common: z-util.o Only in mangband/src/common: z-virt.o Only in mangband/src/server: birth.o diff -r -c -w mangband-014/src/server/cave.c mangband/src/server/cave.c *** mangband-014/src/server/cave.c Sun Apr 20 00:29:31 1997 --- mangband/src/server/cave.c Sun Apr 27 17:45:21 1997 *************** *** 1175,1183 **** if (p_ptr->scr_info[dispy][dispx].c != c || p_ptr->scr_info[dispy][dispx].a != a || (x == p_ptr->px && y==p_ptr->py)) { if (dispx < 0 || dispx > 80) ! printf("dispx = %d.\n", dispx); if (dispy < 0 || dispy > 25) ! printf("dispy = %d.\n", dispy); p_ptr->scr_info[dispy][dispx].c = c; p_ptr->scr_info[dispy][dispx].a = a; --- 1175,1183 ---- if (p_ptr->scr_info[dispy][dispx].c != c || p_ptr->scr_info[dispy][dispx].a != a || (x == p_ptr->px && y==p_ptr->py)) { if (dispx < 0 || dispx > 80) ! s_printf("dispx = %d.\n", dispx); if (dispy < 0 || dispy > 25) ! s_printf("dispy = %d.\n", dispy); p_ptr->scr_info[dispy][dispx].c = c; p_ptr->scr_info[dispy][dispx].a = a; *************** *** 1499,1505 **** */ void do_cmd_view_map(int Ind) { - player_type *p_ptr = Players[Ind]; int cy, cx; /* Enter "icky" mode */ --- 1499,1504 ---- Only in mangband/src/server: cave.o Only in mangband/src/server: cmd1.o Only in mangband/src/server: cmd2.o Only in mangband/src/server: cmd3.o Only in mangband/src/server: cmd4.o Only in mangband/src/server: cmd5.o Only in mangband/src/server: cmd6.o diff -r -c -w mangband-014/src/server/dungeon.c mangband/src/server/dungeon.c *** mangband-014/src/server/dungeon.c Sat Apr 19 20:38:22 1997 --- mangband/src/server/dungeon.c Sun Apr 27 18:06:11 1997 *************** *** 1304,1310 **** { /*printf("Player %d is running (%d)!?!\n", Ind, p_ptr->running);*/ run_step(Ind, 0); ! p_ptr->energy = 0; } /* Repeat until out of energy */ --- 1304,1310 ---- { /*printf("Player %d is running (%d)!?!\n", Ind, p_ptr->running);*/ run_step(Ind, 0); ! p_ptr->energy -= 20; } /* Repeat until out of energy */ *************** *** 1801,1807 **** /* Flash a message */ ! printf("Please wait...\n"); /* Flush the message */ /*Term_fresh();*/ --- 1801,1807 ---- /* Flash a message */ ! s_printf("Please wait...\n"); /* Flush the message */ /*Term_fresh();*/ *************** *** 1814,1820 **** /* Flavor the objects */ flavor_init(); ! printf("Object flavors initialized...\n"); /* Reset the visual mappings */ reset_visuals(); --- 1814,1820 ---- /* Flavor the objects */ flavor_init(); ! s_printf("Object flavors initialized...\n"); /* Reset the visual mappings */ reset_visuals(); *************** *** 1882,1888 **** sched(); /* This should never, ever happen */ ! printf("sched returned!!!\n"); /* Close stuff */ close_game(); --- 1882,1888 ---- sched(); /* This should never, ever happen */ ! s_printf("sched returned!!!\n"); /* Close stuff */ close_game(); Only in mangband/src/server: dungeon.o diff -r -c -w mangband-014/src/server/externs.h mangband/src/server/externs.h *** mangband-014/src/server/externs.h Sat Apr 19 21:30:40 1997 --- mangband/src/server/externs.h Tue Apr 22 14:38:24 1997 *************** *** 671,676 **** --- 671,682 ---- extern void combine_pack(int Ind); extern void reorder_pack(int Ind); + /* printout.c */ + extern int s_print_only_to_file(int which); + extern int s_setup(char *str); + extern int s_shutdown(void); + extern int s_printf(char *str, ...); + /* save.c */ extern bool save_player(int Ind); extern bool load_player(int Ind); diff -r -c -w mangband-014/src/server/files.c mangband/src/server/files.c *** mangband-014/src/server/files.c Sun Mar 23 03:36:36 1997 --- mangband/src/server/files.c Tue Apr 22 14:40:59 1997 *************** *** 484,490 **** if (process_pref_file_aux(buf)) { /* Useful error message */ ! printf("Error in '%s' parsing '%s'.", buf, name); } } --- 484,490 ---- if (process_pref_file_aux(buf)) { /* Useful error message */ ! s_printf("Error in '%s' parsing '%s'.", buf, name); } } *************** *** 3254,3260 **** /* Give warning (after 4) */ else if (signal_count >= 4) { ! printf("Warning: Next signal kills server!\n"); /* Make a noise */ /*Term_xtra(TERM_XTRA_NOISE, 0);*/ --- 3254,3260 ---- /* Give warning (after 4) */ else if (signal_count >= 4) { ! s_printf("Warning: Next signal kills server!\n"); /* Make a noise */ /*Term_xtra(TERM_XTRA_NOISE, 0);*/ Only in mangband/src/server: files.o diff -r -c -w mangband-014/src/server/generate.c mangband/src/server/generate.c *** mangband-014/src/server/generate.c Sat Apr 19 20:40:10 1997 --- mangband/src/server/generate.c Tue Apr 22 14:41:00 1997 *************** *** 3913,3919 **** /* Message */ ! if (why) printf("Generation restarted (%s)\n", why); /* Wipe the objects */ wipe_o_list(Depth); --- 3913,3919 ---- /* Message */ ! if (why) s_printf("Generation restarted (%s)\n", why); /* Wipe the objects */ wipe_o_list(Depth); Only in mangband/src/server: generate.o diff -r -c -w mangband-014/src/server/init1.c mangband/src/server/init1.c *** mangband-014/src/server/init1.c Fri Mar 14 14:08:46 1997 --- mangband/src/server/init1.c Tue Apr 22 14:41:00 1997 *************** *** 6,12 **** #include "angband.h" - /* * This file is used to initialize various variables and arrays for the * Angband game. Note the use of "fd_read()" and "fd_write()" to bypass --- 6,11 ---- *************** *** 938,944 **** } /* Oops */ ! printf("Unknown object flag '%s'.", what); /* Error */ return (1); --- 937,943 ---- } /* Oops */ ! s_printf("Unknown object flag '%s'.", what); /* Error */ return (1); *************** *** 1291,1297 **** } /* Oops */ ! printf("Unknown artifact flag '%s'.", what); /* Error */ return (1); --- 1290,1296 ---- } /* Oops */ ! s_printf("Unknown artifact flag '%s'.", what); /* Error */ return (1); *************** *** 1586,1592 **** } /* Oops */ ! printf("Unknown ego-item flag '%s'.", what); /* Error */ return (1); --- 1585,1591 ---- } /* Oops */ ! s_printf("Unknown ego-item flag '%s'.", what); /* Error */ return (1); *************** *** 1871,1877 **** } /* Oops */ ! printf("Unknown monster flag '%s'.", what); /* Failure */ return (1); --- 1870,1876 ---- } /* Oops */ ! s_printf("Unknown monster flag '%s'.", what); /* Failure */ return (1); *************** *** 1916,1922 **** } /* Oops */ ! printf("Unknown monster flag '%s'.", what); /* Failure */ return (1); --- 1915,1921 ---- } /* Oops */ ! s_printf("Unknown monster flag '%s'.", what); /* Failure */ return (1); Only in mangband/src/server: init1.o diff -r -c -w mangband-014/src/server/init2.c mangband/src/server/init2.c *** mangband-014/src/server/init2.c Fri Mar 14 14:08:46 1997 --- mangband/src/server/init2.c Tue Apr 22 14:41:01 1997 *************** *** 303,310 **** while (0 == my_fgets(fp, buf, 1024)) { /* Display and advance */ ! printf(buf); ! printf("\n"); } /* Close */ --- 303,310 ---- while (0 == my_fgets(fp, buf, 1024)) { /* Display and advance */ ! s_printf(buf); ! s_printf("\n"); } /* Close */ *************** *** 529,535 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'f_info.raw' file."); /*print(NULL);*/ } --- 529,535 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'f_info.raw' file."); /*print(NULL);*/ } *************** *** 574,582 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'f_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 574,582 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'f_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 782,788 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'k_info.raw' file."); /*msg_print(NULL);*/ } --- 782,788 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'k_info.raw' file."); /*msg_print(NULL);*/ } *************** *** 827,835 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'k_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 827,835 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'k_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 1035,1041 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'a_info.raw' file."); /*msg_print(NULL);*/ } --- 1035,1041 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'a_info.raw' file."); /*msg_print(NULL);*/ } *************** *** 1080,1088 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'a_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 1080,1088 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'a_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 1288,1294 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'e_info.raw' file."); /*msg_print(NULL);*/ } --- 1288,1294 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'e_info.raw' file."); /*msg_print(NULL);*/ } *************** *** 1333,1341 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'e_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 1333,1341 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'e_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 1541,1547 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'r_info.raw' file."); /*msg_print(NULL);*/ } --- 1541,1547 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'r_info.raw' file."); /*msg_print(NULL);*/ } *************** *** 1586,1594 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'r_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 1586,1594 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'r_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 1793,1799 **** if (!err) return (0); /* Information */ ! printf("Ignoring obsolete/defective 'v_info.raw' file."); /*msg_print(NULL);*/ } --- 1793,1799 ---- if (!err) return (0); /* Information */ ! s_printf("Ignoring obsolete/defective 'v_info.raw' file."); /*msg_print(NULL);*/ } *************** *** 1838,1846 **** oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! printf("Error %d at line %d of 'v_info.txt'.", err, error_line); ! printf("Record %d contains a '%s' error.", error_idx, oops); ! printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ --- 1838,1846 ---- oops = (((err > 0) && (err < 8)) ? err_str[err] : "unknown"); /* Oops */ ! s_printf("Error %d at line %d of 'v_info.txt'.", err, error_line); ! s_printf("Record %d contains a '%s' error.", error_idx, oops); ! s_printf("Parsing '%s'.", buf); /*msg_print(NULL);*/ /* Quit */ *************** *** 2580,2618 **** void init_some_arrays(void) { /* Initialize feature info */ ! printf("[Initializing arrays... (features)]\n"); if (init_f_info()) quit("Cannot initialize features"); /* Initialize object info */ ! printf("[Initializing arrays... (objects)]\n"); if (init_k_info()) quit("Cannot initialize objects"); /* Initialize artifact info */ ! printf("[Initializing arrays... (artifacts)]\n"); if (init_a_info()) quit("Cannot initialize artifacts"); /* Initialize ego-item info */ ! printf("[Initializing arrays... (ego-items)]\n"); if (init_e_info()) quit("Cannot initialize ego-items"); /* Initialize monster info */ ! printf("[Initializing arrays... (monsters)]\n"); if (init_r_info()) quit("Cannot initialize monsters"); /* Initialize feature info */ ! printf("[Initializing arrays... (vaults)]\n"); if (init_v_info()) quit("Cannot initialize vaults"); /* Initialize some other arrays */ ! printf("[Initializing arrays... (other)]\n"); if (init_other()) quit("Cannot initialize other stuff"); /* Initialize some other arrays */ ! printf("[Initializing arrays... (alloc)]\n"); if (init_alloc()) quit("Cannot initialize alloc stuff"); /* Hack -- all done */ ! printf("[Initializing arrays... done]\n"); } --- 2580,2618 ---- void init_some_arrays(void) { /* Initialize feature info */ ! s_printf("[Initializing arrays... (features)]\n"); if (init_f_info()) quit("Cannot initialize features"); /* Initialize object info */ ! s_printf("[Initializing arrays... (objects)]\n"); if (init_k_info()) quit("Cannot initialize objects"); /* Initialize artifact info */ ! s_printf("[Initializing arrays... (artifacts)]\n"); if (init_a_info()) quit("Cannot initialize artifacts"); /* Initialize ego-item info */ ! s_printf("[Initializing arrays... (ego-items)]\n"); if (init_e_info()) quit("Cannot initialize ego-items"); /* Initialize monster info */ ! s_printf("[Initializing arrays... (monsters)]\n"); if (init_r_info()) quit("Cannot initialize monsters"); /* Initialize feature info */ ! s_printf("[Initializing arrays... (vaults)]\n"); if (init_v_info()) quit("Cannot initialize vaults"); /* Initialize some other arrays */ ! s_printf("[Initializing arrays... (other)]\n"); if (init_other()) quit("Cannot initialize other stuff"); /* Initialize some other arrays */ ! s_printf("[Initializing arrays... (alloc)]\n"); if (init_alloc()) quit("Cannot initialize alloc stuff"); /* Hack -- all done */ ! s_printf("[Initializing arrays... done]\n"); } Only in mangband/src/server: init2.o Only in mangband/src/server: load2.o diff -r -c -w mangband-014/src/server/main.c mangband/src/server/main.c *** mangband-014/src/server/main.c Fri Mar 14 14:08:48 1997 --- mangband/src/server/main.c Tue Apr 22 16:52:57 1997 *************** *** 179,185 **** int main(int argc, char *argv[]) { bool new_game = FALSE; ! int show_score = 0; --- 179,185 ---- int main(int argc, char *argv[]) { bool new_game = FALSE; ! char buf[1024]; int show_score = 0; *************** *** 212,218 **** --- 212,224 ---- /* Get the file paths */ init_stuff(); + /* Initialize the server log file */ + path_build(buf, 1024, ANGBAND_DIR_XTRA, "mangband.log"); + /* Open the file */ + s_setup(buf); + + #ifdef SET_UID /* Get the user id (?) */ Only in mangband/src/server: main.o Only in mangband/src/server: melee1.o Only in mangband/src/server: melee2.o Only in mangband/src/server: monster1.o diff -r -c -w mangband-014/src/server/monster2.c mangband/src/server/monster2.c *** mangband-014/src/server/monster2.c Tue Mar 25 20:47:46 1997 --- mangband/src/server/monster2.c Tue Apr 22 14:41:01 1997 *************** *** 120,126 **** /* Message (only if compacting) */ ! if (size) printf("Compacting monsters..."); /* Compact at least 'size' objects */ --- 120,126 ---- /* Message (only if compacting) */ ! if (size) s_printf("Compacting monsters..."); /* Compact at least 'size' objects */ *************** *** 359,365 **** /* Warn the player */ ! if (server_dungeon) printf("Too many monsters!"); /* Try not to crash */ return (0); --- 359,365 ---- /* Warn the player */ ! if (server_dungeon) s_printf("Too many monsters!"); /* Try not to crash */ return (0); Only in mangband/src/server: monster2.o diff -r -c -w mangband-014/src/server/netserver.c mangband/src/server/netserver.c *** mangband-014/src/server/netserver.c Sun Apr 20 16:35:01 1997 --- mangband/src/server/netserver.c Sun Apr 27 17:48:42 1997 *************** *** 90,96 **** static connection_t *Conn = NULL; static int max_connections = 0; ! /*static setup_t *Setup = NULL;*/ static int (*playing_receive[256])(int ind), (*login_receive[256])(int ind), (*drain_receive[256])(int ind); --- 90,96 ---- static connection_t *Conn = NULL; static int max_connections = 0; ! static setup_t Setup; static int (*playing_receive[256])(int ind), (*login_receive[256])(int ind), (*drain_receive[256])(int ind); *************** *** 201,207 **** --- 201,237 ---- playing_receive[PKT_ITEM] = Receive_item; } + static int Init_setup(void) + { + int n = 0; + char buf[1024]; + FILE *fp; + Setup.frames_per_second = FPS; + Setup.motd_len = 23 * 80; + Setup.setup_size = sizeof(setup_t); + + path_build(buf, 1024, ANGBAND_DIR_FILE, "news.txt"); + + /* Open the news file */ + fp = my_fopen(buf, "r"); + + if (fp) + { + /* Dump the file into the buffer */ + while (0 == my_fgets(fp, buf, 1024) && n < 23) + { + strncpy(&Setup.motd[n * 80], buf, 80); + n++; + } + + my_fclose(fp); + } + + return 0; + } + + /* * Talk to the metaserver. * *************** *** 271,277 **** if ((bytes = DgramSend(MetaSocket, "mangband.mit.edu", 8800, meta_buf.buf, meta_buf.len) == -1)) { ! printf("Couldn't send info to meta-server!\n"); return FALSE; } --- 301,307 ---- if ((bytes = DgramSend(MetaSocket, "mangband.mit.edu", 8800, meta_buf.buf, meta_buf.len) == -1)) { ! s_printf("Couldn't send info to meta-server!\n"); return FALSE; } *************** *** 288,293 **** --- 318,326 ---- Init_receive(); + if (Init_setup() == -1) + return -1; + /* * The number of connections is limited by the number of bases * and the max number of possible file descriptors to use in *************** *** 307,313 **** /* Tell the metaserver that we're starting up */ Report_to_meta(META_START); ! printf("Server is running version %04x\n", MY_VERSION); return 0; } --- 340,346 ---- /* Tell the metaserver that we're starting up */ Report_to_meta(META_START); ! s_printf("Server is running version %04x\n", MY_VERSION); return 0; } *************** *** 435,442 **** nick_name[sizeof(nick_name) - 1] = '\0'; host_name[sizeof(host_name) - 1] = '\0'; ! /*printf("Received contact from %s:%d.\n", host_name, port);*/ status = Enter_player(real_name, nick_name, host_addr, host_name, race, class, sex, version, port, &login_port); --- 468,478 ---- nick_name[sizeof(nick_name) - 1] = '\0'; host_name[sizeof(host_name) - 1] = '\0'; ! /* printf("Received contact from %s:%d.\n", host_name, port); ! printf("Address: %s.\n", host_addr); ! printf("Info: real_name %s, port %hu, nick %s, host %s, race %hd, class %hd, sex %hd, version %hu\n", real_name, port, nick_name, host_name, race, class, sex, version); */ + status = Enter_player(real_name, nick_name, host_addr, host_name, race, class, sex, version, port, &login_port); *************** *** 462,471 **** if ((status = Check_names(nick, real, host)) != SUCCESS) { ! printf("Check_names failed with result %d.\n", status); return status; } *login_port = Setup_connection(real, nick, host, host, race, class, sex, version); if (*login_port == -1) --- 498,512 ---- if ((status = Check_names(nick, real, host)) != SUCCESS) { ! s_printf("Check_names failed with result %d.\n", status); return status; } + if (version < 0x0150) + { + return E_VERSION; + } + *login_port = Setup_connection(real, nick, host, host, race, class, sex, version); if (*login_port == -1) *************** *** 535,544 **** /* Show everyone his disappearance */ everyone_lite_spot(p_ptr->dun_depth, p_ptr->py, p_ptr->px); - /* If he was the last one on his level, delete that level */ - if (players_on_depth[p_ptr->dun_depth] == 0 && p_ptr->dun_depth > 0) - dealloc_dungeon_level(p_ptr->dun_depth); - /* Try to save his character */ save_player(Ind); --- 576,581 ---- *************** *** 577,582 **** --- 614,622 ---- } + /* If he was the last one on his level, delete that level */ + if (players_on_depth[p_ptr->dun_depth] == 0 && p_ptr->dun_depth > 0) + dealloc_dungeon_level(p_ptr->dun_depth); /* Swap entry number 'Ind' with the last one */ p_ptr = Players[NumPlayers]; *************** *** 625,640 **** sock = connp->w.sock; remove_input(sock); ! strncpy(&pkt[1], reason, sizeof(pkt) - 2); ! pkt[sizeof(pkt) - 1] = '\0'; pkt[0] = PKT_QUIT; ! len = strlen(pkt) + 1; if (DgramWrite(sock, pkt, len) != len) { GetSocketError(sock); DgramWrite(sock, pkt, len); } ! printf("%s: Goodbye %s=%s@%s (\"%s\")\n", showtime(), connp->nick ? connp->nick : "", connp->real ? connp->real : "", --- 665,683 ---- sock = connp->w.sock; remove_input(sock); ! strncpy(&pkt[1], reason, sizeof(pkt) - 3); ! pkt[sizeof(pkt) - 2] = '\0'; pkt[0] = PKT_QUIT; ! len = strlen(pkt) + 2; ! pkt[len - 1] = PKT_END; ! pkt[len] = '\0'; ! /*len++;*/ if (DgramWrite(sock, pkt, len) != len) { GetSocketError(sock); DgramWrite(sock, pkt, len); } ! s_printf("%s: Goodbye %s=%s@%s (\"%s\")\n", showtime(), connp->nick ? connp->nick : "", connp->real ? connp->real : "", *************** *** 728,734 **** if (free_conn_index >= max_connections) { ! printf("Full house for %s(%s)@%s\n", real, nick, host); return -1; } connp = &Conn[free_conn_index]; --- 771,777 ---- if (free_conn_index >= max_connections) { ! s_printf("Full house for %s(%s)@%s\n", real, nick, host); return -1; } connp = &Conn[free_conn_index]; *************** *** 807,812 **** --- 850,857 ---- static int Handle_setup(int ind) { connection_t *connp = &Conn[ind]; + char *buf; + int n, len; if (connp->state != CONN_SETUP) { *************** *** 814,823 **** --- 859,915 ---- return -1; } + if (connp->setup == 0) + { + n = Packet_printf(&connp->c, "%ld%hd", + Setup.motd_len, Setup.frames_per_second); + + if (n <= 0) + { + Destroy_connection(ind, "Setup 0 write error"); + return -1; + } + + connp->setup = (char *) &Setup.motd[0] - (char *) &Setup; + } + else if (connp->setup < Setup.setup_size) + { + if (connp->c.len > 0) + { + /* If there is still unacked reliable data test for acks. */ + Handle_input(-1, (void *) ind); + if (connp->state == CONN_FREE) + return -1; + } + } + if (connp->setup < Setup.setup_size) + { + len = MIN(connp->c.size, 4096) - connp->c.len; + if (len <= 0) + { + /* Wait for acknowledgement of previously transmitted data. */ return 0; } + if (len > Setup.setup_size - connp->setup) + len = Setup.setup_size - connp->setup; + buf = (char *) &Setup; + if (Sockbuf_write(&connp->c, &buf[connp->setup], len) != len) + { + Destroy_connection(ind, "sockbuf write setup error"); + return -1; + } + connp->setup += len; + if (len >= 512) + connp->start += (len * FPS) / (8 * 512) + 1; + } + if (connp->setup >= Setup.setup_size) + Conn_set_state(connp, CONN_DRAIN, CONN_LOGIN); + return 0; + } + + /* * Handle a connection that is in the listening state. */ *************** *** 836,841 **** --- 928,945 ---- Sockbuf_clear(&connp->r); errno = 0; n = DgramReceiveAny(connp->r.sock, connp->r.buf, connp->r.size); + + /* s_printf("Listening on connection %d, received %d bytes.\n", ind, n); + + for (i = 0; i < n; i++) + { + printf("%3d ", connp->r.ptr[i] & 0xff); + if (i % 20 == 0) + printf("\n"); + } + + printf("\n"); */ + if (n <= 0) { if (n == 0 || errno == EWOULDBLOCK || errno == EAGAIN) *************** *** 853,863 **** Destroy_connection(ind, "connect error"); return -1; } ! printf("%s: Welcome %s=%s@%s (%s/%d)", showtime(), connp->nick, connp->real, connp->host, connp->addr, connp->his_port); if (connp->version != MY_VERSION) ! printf(" (version %04x)", connp->version); ! printf("\n"); if (connp->r.ptr[0] != PKT_VERIFY) { --- 957,967 ---- Destroy_connection(ind, "connect error"); return -1; } ! s_printf("%s: Welcome %s=%s@%s (%s/%d)", showtime(), connp->nick, connp->real, connp->host, connp->addr, connp->his_port); if (connp->version != MY_VERSION) ! s_printf(" (version %04x)", connp->version); ! s_printf("\n"); if (connp->r.ptr[0] != PKT_VERIFY) { *************** *** 875,881 **** } if (strcmp(real, connp->real)) { ! printf("Client verified incorrectly (%s, %s)(%s, %s)", real, nick, connp->real, connp->nick); Send_reply(ind, PKT_VERIFY, PKT_FAILURE); Send_reliable(ind); --- 979,985 ---- } if (strcmp(real, connp->real)) { ! s_printf("Client verified incorrectly (%s, %s)(%s, %s)", real, nick, connp->real, connp->nick); Send_reply(ind, PKT_VERIFY, PKT_FAILURE); Send_reliable(ind); *************** *** 895,901 **** return -1; } ! Conn_set_state(connp, CONN_DRAIN, CONN_LOGIN); return -1; } --- 999,1005 ---- return -1; } ! Conn_set_state(connp, CONN_DRAIN, CONN_SETUP); return -1; } *************** *** 2416,2423 **** char ch; ! int n, player, item; char inscription[80]; if (connp->id != -1) player = GetInd[connp->id]; --- 2520,2529 ---- char ch; ! int n, player; + s16b item; + char inscription[80]; if (connp->id != -1) player = GetInd[connp->id]; *************** *** 2441,2448 **** char ch; ! int n, player, item; if (connp->id != -1) player = GetInd[connp->id]; if ((n = Packet_scanf(&connp->r, "%c%hd", &ch, &item)) <= 0) --- 2547,2556 ---- char ch; ! int n, player; + s16b item; + if (connp->id != -1) player = GetInd[connp->id]; if ((n = Packet_scanf(&connp->r, "%c%hd", &ch, &item)) <= 0) *************** *** 2886,2893 **** { if (Players[i]->conn == NOT_CONNECTED) continue; - if (i == player) - continue; msg_format(i, "[%s] %s", Players[player]->name, buf); } --- 2994,2999 ---- diff -r -c -w mangband-014/src/server/netserver.h mangband/src/server/netserver.h *** mangband-014/src/server/netserver.h Sun Mar 23 16:26:54 1997 --- mangband/src/server/netserver.h Sat Apr 26 14:01:22 1997 *************** *** 55,60 **** --- 55,61 ---- int sex; } connection_t; + static int Handle_listening(int ind); static int Handle_setup(int ind); static int Handle_login(int ind); Only in mangband/src/server: netserver.o Only in mangband/src/server: object1.o diff -r -c -w mangband-014/src/server/object2.c mangband/src/server/object2.c *** mangband-014/src/server/object2.c Thu Mar 27 20:57:12 1997 --- mangband/src/server/object2.c Thu Apr 24 14:26:39 1997 *************** *** 91,97 **** if (size) { /* Message */ ! printf("Compacting objects..."); /* Redraw map */ /*p_ptr->redraw |= (PR_MAP);*/ --- 91,97 ---- if (size) { /* Message */ ! s_printf("Compacting objects..."); /* Redraw map */ /*p_ptr->redraw |= (PR_MAP);*/ *************** *** 308,314 **** /* Warn the player */ ! if (server_dungeon) printf("Too many objects!"); /* Oops */ return (0); --- 308,314 ---- /* Warn the player */ ! if (server_dungeon) s_printf("Too many objects!"); /* Oops */ return (0); *************** *** 1124,1130 **** } /* Oops */ ! printf("No object (%d,%d)", tval, sval); /* Oops */ return (0); --- 1124,1130 ---- } /* Oops */ ! s_printf("No object (%d,%d)", tval, sval); /* Oops */ return (0); *************** *** 3385,3391 **** ny = y1 = y; nx = x1 = x; /* Try (20 times) to find an adjacent usable location */ ! for (k = 0; !flag && (k < 20); ++k) { /* Distance distribution */ d = ((k + 14) / 15); --- 3385,3391 ---- ny = y1 = y; nx = x1 = x; /* Try (20 times) to find an adjacent usable location */ ! for (k = 0; !flag && (k < 50); ++k) { /* Distance distribution */ d = ((k + 14) / 15); Only in mangband/src/server: object2.o Only in mangband/src/server: printout.c Only in mangband/src/server: printout.o diff -r -c -w mangband-014/src/server/save.c mangband/src/server/save.c *** mangband-014/src/server/save.c Mon Mar 24 21:52:56 1997 --- mangband/src/server/save.c Tue Apr 22 14:41:03 1997 *************** *** 2306,2312 **** if (access(p_ptr->savefile, 0) < 0) { /* Give a message */ ! printf("Savefile does not exist for player %s.\n", p_ptr->name); /* Allow this */ return (TRUE); --- 2306,2312 ---- if (access(p_ptr->savefile, 0) < 0) { /* Give a message */ ! s_printf("Savefile does not exist for player %s.\n", p_ptr->name); /* Allow this */ return (TRUE); Only in mangband/src/server: save.o Only in mangband/src/server: sched.o diff -r -c -w mangband-014/src/server/spells1.c mangband/src/server/spells1.c *** mangband-014/src/server/spells1.c Sat Apr 19 12:37:15 1997 --- mangband/src/server/spells1.c Mon Apr 28 16:26:11 1997 *************** *** 3432,3437 **** --- 3432,3439 ---- /* Player cannot hurt himself */ if (who == Ind) return (FALSE); + /* Mega-Hack -- Players cannot hurt other players */ + if (who <= 0) return (FALSE); /* Extract radius */ div = r + 1; *************** *** 4143,4149 **** if (!(flg & PROJECT_THRU) && (x == x2) && (y == y2)) break; /* If allowed, and we have moved at all, stop when we hit anybody */ ! if (c_ptr->m_idx && dist && (flg & PROJECT_STOP)) break; /* Calculate the new location */ --- 4145,4151 ---- if (!(flg & PROJECT_THRU) && (x == x2) && (y == y2)) break; /* If allowed, and we have moved at all, stop when we hit anybody */ ! if ((c_ptr->m_idx || c_ptr->p_idx) && dist && (flg & PROJECT_STOP)) break; /* Calculate the new location */ *************** *** 4310,4316 **** drawn = TRUE; ! for (k = 0; k <= num_can_see; k++) { if (who_can_see[k] == j) flag = FALSE; --- 4312,4318 ---- drawn = TRUE; ! for (k = 0; k < num_can_see; k++) { if (who_can_see[k] == j) flag = FALSE; *************** *** 4327,4332 **** --- 4329,4338 ---- /* Flush each "radius" seperately */ for (j = 0; j < num_can_see; j++) { + int k; + + /* Flush a few times, to slow it down */ + for (k = 0; k < 3; k++) Send_flush(who_can_see[j]); } } Only in mangband/src/server: spells1.o Only in mangband/src/server: spells2.o Only in mangband/src/server: store.o Only in mangband/src/server: tables.o Only in mangband/src/server: util.o Only in mangband/src/server: variable.o Only in mangband/src/server: xtra1.o Only in mangband/src/server: xtra2.o