`make depend' attempts to make dependencies for *.c. This is plain
evil, and ought to be fixed. In particular, it chokes on this file,
because it includes Windows specific headers. Which is fine, as the
file is compiled only under Windows.
Quick band-aid: wrap the file contents in #ifdef _WIN32.
(multifire): If firing at a submarine with something that can't drop
depth charges, don't disclose the target is a submarine. Old code
allowed players to find all submarine uids.
From Ray Hyatt:
(dchrstr): New member d_maxpop.
(dchr): Initialize it.
(max_pop): Use it. Use dchr[SCT_MINE].d_maxpop when called with null
argument. RES_POP now affects mountains and plains as well.
Ron Koenderink [Fri, 31 Dec 2004 20:14:10 +0000 (20:14 +0000)]
(tend_nxtitem,nxtitem,sarg_type,snxtitem,snxtitem_all,snxtsct,nxtitemp):
change NS_ALL to NS_EVERYTHING in ns_seltype because of a
conflict with winsock2.h which is used in the WIN32 build.
Ron Koenderink [Thu, 30 Dec 2004 13:53:46 +0000 (13:53 +0000)]
(multifire) [_WIN32]: Rely on misc.h to provide BSD random functions.
(multifire): switch the random seeding with the current random
value to seeding with the current time. Seeding with the
current random value does not actually improve the randomness.
Ron Koenderink [Thu, 30 Dec 2004 02:19:44 +0000 (02:19 +0000)]
(main,install_service,remove_service,service_main) [_WIN32]:
Add the ability to specify the service name, to install
multiple services and to set -D and -e options during install.
Ron Koenderink [Thu, 30 Dec 2004 01:31:03 +0000 (01:31 +0000)]
(main,mobility_check,upda,turn,rea,mobupdate,ef_open,logerror,
emp_config,gamedown,show_motd,match_user,typed_wu,
delete_old_announcements) [_WIN32]: switch the default file mode to
binary to match POSIX. Remove the now unneccessary ifdef for
the open/fopen. Add text mode for user files (econfig/auth).
Ron Koenderink [Tue, 21 Dec 2004 03:10:30 +0000 (03:10 +0000)]
(main,close_files,loc_NT_Term,empth_exit):
Add Windows Service to the server.
This includes adding install service and remove service option.
Move the start code from main to separate function.
Make close_files() and loc_NT_Term() global.
Move disassoc() to be earlier in the startup sequence.
Marc Olzheim [Fri, 17 Dec 2004 15:44:57 +0000 (15:44 +0000)]
"(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for _WIN32 in include/misc.h."
Marc Olzheim [Fri, 17 Dec 2004 15:39:28 +0000 (15:39 +0000)]
"(turn): Fix comparing the output of write() to an unsigned sizeof by
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for WIN32."
Ron Koenderink [Thu, 16 Dec 2004 19:40:06 +0000 (19:40 +0000)]
(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().
Ron Koenderink [Thu, 16 Dec 2004 19:28:17 +0000 (19:28 +0000)]
(ac_calc_flak,ac_fireflak,pinflak_planedamage): New ac_calc_flak().
Move common flak damage code from ac_fireflak() and
pinflak_planedamage() to ac_calc_flak().
Marc Olzheim [Thu, 16 Dec 2004 14:17:08 +0000 (14:17 +0000)]
(turn): Change the command to allow for both an MOTD and a no-login
message. Clean 'register' and 's_char' remnants on the way.
Circumvents bug #813167.
Marc Olzheim [Thu, 16 Dec 2004 12:25:56 +0000 (12:25 +0000)]
(EFF_COM,ef_items): No longer in use after removal of 'variables'. Removed.
Clean 'register' and s_char on the way. Remove dead code.
Rename some variables to better reflect their meaning.
Add function comments.
Ron Koenderink [Thu, 16 Dec 2004 11:12:28 +0000 (11:12 +0000)]
(have_looked,have_found,set_have_looked,set_have_found,print_found):
collapse to shiplist function set (add,free,print,on). Fix bug where ship
uid was a unsigned char instead of short. Switch to head pointer instead
of head record with a linked list. Add a free().
Marc Olzheim [Tue, 14 Dec 2004 17:21:05 +0000 (17:21 +0000)]
(ac_airtoair): No need to pass def_own, as the owner of the intercepting
planes is used anyway. Clean up other unaccessed variables in the process.
No functional changes.
Ron Koenderink [Sun, 12 Dec 2004 19:39:35 +0000 (19:39 +0000)]
(sct_pstage, sct_ptime, shp_pstage, shp_ptime, lnd_pstage, lnd_ptime):
Use `short' instead of `unsigned short'. With variables, plague stage
and time were stored unsigned and used signed, which worked. Removal
of variables dropped the conversion to signed, which broke
plague_people() (plague.c rev. 1.6): stage didn't progress correctly
due to catastrophic underflow of time.