Commit graph

3711 commits

Author SHA1 Message Date
e5804f8dd8 (prod, produce, upd_ship): struct pchrstr p_nrndx refers to u_char,
not s_char.  Fix types.

(upd_ship): Catch resource underflow (should not happen).
2005-02-19 17:28:30 +00:00
d5d8028ad1 (max_population): Fix for opt_RES_POP and d_maxpop != 999. 2005-02-17 21:40:24 +00:00
ff67d93711 (max_population): New, factored out of max_pop().
(max_pop): Use it.  Don't support null argument anymore.
(nati, gen_power): Use max_population() instead of max_pop() with null
argument.
(show_sect_stats): Use max_population() to simplify the code.
(prod, upd_buildeff): Use max_population() to get correct new maximum
population for limiting work when tearing down a big city.
Previously, this was broken in upd_buildeff().  In prod(), it was
broken when the new designation had odd maximum population, which
should not occur.
2005-02-17 21:04:08 +00:00
f8b2860ec5 (prod, nati): Use max_pop() instead of hardcoded values. Before,
struct dchrstr member d_maxpop had no effect in some cases.
2005-02-13 18:25:30 +00:00
41da51e548 (newe): Fix for max_pop() > 999. 2005-02-13 18:25:14 +00:00
236c29a0c5 Break an inclusion cycle missed by yesterday's change. 2005-02-13 10:37:46 +00:00
d89fdd8e31 `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.
2005-02-12 19:45:59 +00:00
afa65c8f27 Break inclusion cycles. To simplify the change, move a few
declarations to other, no less sensible places.
2005-02-12 19:26:59 +00:00
858839f063 (dchr_ca): New selector maxpop. 2005-02-12 17:06:21 +00:00
aa26c53e47 (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.
2005-02-12 16:43:08 +00:00
c5ec381b4f Products table used tlev and tech synonymously. Confusing. Just use
tech.
2005-02-12 16:31:16 +00:00
153527a3eb 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.
2005-02-12 16:17:57 +00:00
Ron Koenderink
8a093f32f1 [service_main]: Code cleanup, remove commented out debugging,
remove unnecessary include files.
2005-01-22 19:45:17 +00:00
Marc Olzheim
796ed1d06f Update patch for src/lib/commands/news.c:1.8 No functional changes. 2005-01-07 10:25:11 +00:00
Ron Koenderink
c0618aec6e (news, fina): Report bad conditionals as syntax error. Closes #775475. 2005-01-06 02:09:30 +00:00
Marc Olzheim
d1df194176 Clean up register keywords. No functional changes. 2005-01-03 21:03:53 +00:00
Marc Olzheim
76e639fa86 Use _l_rand48(). in src/util/fairland.c 2005-01-03 19:59:31 +00:00
Marc Olzheim
7cf3f0f6ca Fix the previous patch by using emp_{s,}random() instead if {s,}rand48()
in src/lib/commands/{new,mfir}.c
2005-01-03 18:31:31 +00:00
Marc Olzheim
de5ad66f07 Update patch for src/util/fairland.c:1.16 src/lib/commands/new.c:1.19
src/lib/commands/mfir.c:1.20 src/server/main.c:1.35.
No functional changes.
2005-01-03 17:31:54 +00:00
Ron Koenderink
aabed1b346 [_WIN32]: Upgrade to Windows Sockets 2. 2004-12-31 20:40:39 +00:00
Ron Koenderink
c99a5b4f43 (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.
2004-12-31 20:14:10 +00:00
Ron Koenderink
9b56e4d5a0 (rea): Add brackets to prevent 'else' ambiguity. 2004-12-31 14:12:34 +00:00
Ron Koenderink
12902fe7ee (wrauth,wrgamesdef,wrmakesrc): update copyright notices to 2004. 2004-12-30 14:19:21 +00:00
Ron Koenderink
9204e8cf08 (main,wr_auth) [_WIN32]: switch the default file mode to
binary to match POSIX.  Add text mode for auth file.
2004-12-30 14:14:04 +00:00
Ron Koenderink
667b137216 (new) [_WIN32]: Rely on misc.h to provide BSD random functions. 2004-12-30 13:57:04 +00:00
Ron Koenderink
7a95982a21 (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.
2004-12-30 13:53:46 +00:00
Ron Koenderink
b3ec8c14da The previous rev. was committed accidentally, revert. 2004-12-30 02:51:12 +00:00
Ron Koenderink
70fcb70707 (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.
2004-12-30 02:19:44 +00:00
Ron Koenderink
cc1a92e512 (rea): Code cleanup. 2004-12-30 01:43:39 +00:00
Ron Koenderink
1a8488bc45 (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).
2004-12-30 01:31:03 +00:00
Ron Koenderink
f6e78f4589 (main,ef_open) [_WIN32]: switch the default file mode to
binary to match POSIX.  Remove the now unneccessary ifdef for
the open.
2004-12-29 23:40:04 +00:00
Ron Koenderink
c3ac61e1e4 (main,allocate_memory) [_WIN32]: switch the default file mode to
binary to match POSIX.  Remove the now unneccessary ifdef for
the open.
2004-12-29 23:34:08 +00:00
Ron Koenderink
331aac2afa (main) [_WIN32]: remove getpid() from the random seed as
it did not improve the randomness of the seed.
2004-12-29 23:20:24 +00:00
Ron Koenderink
f6666518c7 (main): switch to use standard srandom() and random().
Remove the SRANDOM and RANDOM defines.
2004-12-29 23:15:04 +00:00
Ron Koenderink
750f351a94 (parse_args): fix the print usage for script file name to print the
default instead of the current file name as per the description.
2004-12-29 23:01:43 +00:00
Ron Koenderink
2629b92102 (main) [_WIN32]: enable command line options for WIN32. 2004-12-29 22:52:05 +00:00
d2ae708dea Update for 4.2.19. 2004-12-23 20:42:39 +00:00
970ffc72fd Indentation fix. 2004-12-21 20:09:14 +00:00
7c1e58b2e4 Updated from man/emp_client.6 rev. 1.7. 2004-12-21 13:40:47 +00:00
77a74e2ef7 Fix spelling of daemon, for crying out loud!
Remove irrelevant information on player thread.

Clarify that -d makes the server abort on internal errors.
2004-12-21 13:27:36 +00:00
Marc Olzheim
c705b7a674 Update patch for src/server/main.c:1.29,include/prototypes.h:1.61 and
src/lib/commands/laun.c:1.9.  No functional changes.
2004-12-21 13:19:29 +00:00
cf37a9f2f6 Fix typesetting of option arguments.
Fix English in section authors.
2004-12-21 13:16:46 +00:00
e019a3dc63 Really fix typesetting of option arguments. 2004-12-21 13:06:32 +00:00
479c0471fe Move arguments behind options in the synopsis.
Fix typesetting of option arguments.

Document environment variables more clearly, and without assuming csh
syntax.
2004-12-21 12:48:46 +00:00
75189a496d (main, start_sever): Previous revision broke POSIX threads under
Linux.  Undo the problematic bit of the change.
2004-12-21 12:29:51 +00:00
5202ef59cc Realign comment with its object; got separated in the previous rev.
No functional changes.
2004-12-21 12:26:30 +00:00
6ce77efd82 Fix rev. 1.5's placement of braces. No functional changes. 2004-12-21 12:23:01 +00:00
Ron Koenderink
63ea309bd0 Explain that -s and -p imply -d. 2004-12-21 03:22:10 +00:00
Ron Koenderink
537735f512 switched comment from // format to /* */ format. 2004-12-21 03:16:18 +00:00
Ron Koenderink
e342a73130 (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.
2004-12-21 03:10:30 +00:00