Commit graph

2999 commits

Author SHA1 Message Date
32d6c5e1b7 A script for post_crash_dump_hook 2008-04-25 22:13:08 +02:00
f63401329d New post_crash_dump_hook
Run it from crash_dump().  Useful to move core files out of the way,
alert deities by e-mail, and so forth.
2008-04-25 22:12:22 +02:00
dd0737f8e7 Detect and log errors in crash_dump() 2008-04-25 22:09:52 +02:00
f55860670a Move oops actions from log.c up to application
Change oops() to call the new oops_handler function pointer instead of
offering a fixed set of actions.  Change server's main() to install a
handler for the action requested by -E.
2008-04-25 22:06:13 +02:00
6709931d51 Give try_supply_commod() internal linkage 2008-04-22 21:56:35 +02:00
627e7d452d New server option -E to choose what to do on oops
Three options: abort, crash-dump, nothing.  crash-dump works by
aborting a fork.  It isn't implemented for Windows.

The oops action is no longer tied to daemon mode, but -d still implies
-E abort for convenience.
2008-04-21 21:52:27 +02:00
beb8a7ceb4 Flush every journal entry even when not in debug mode
Somewhat wasteful, but useful in case of a crash.
2008-04-21 20:42:50 +02:00
b1a0ff2fbd Don't let trains load trains
Doesn't affect the stock game, because its only train is heavy.
2008-04-20 15:11:15 +02:00
Ron Koenderink
aab015c641 Allow deity to display power report for all types of countries
Relax country status check of power c for deities.  Can be useful to
display NPCs.
2008-04-20 15:11:09 +02:00
66406bd240 Fix designate's check for disallowed sector types
Bug lets mortals designate all sector types, including sanctuaries.
desi() complains, but then executes anyway.  Broken in commit
8227d8c8, v4.3.12.
2008-04-16 07:45:07 +02:00
9272c47c9f Bump version to 4.3.14 2008-04-16 07:38:39 +02:00
fa98d40e86 Final polish for 4.3.13 2008-04-15 21:04:03 +02:00
2d4e4e0d96 Fix documented syntax of edit command.
While there: editing nukes isn't implemented, don't advertise it.
2008-04-15 20:57:28 +02:00
b88d59b9e4 Document that nukes can be traded 2008-04-15 20:56:07 +02:00
ba628b82bd Fix and polish comments emitted by pconfig 2008-04-15 20:29:29 +02:00
ae2a8097b8 4.3.13 late changes 2008-04-11 22:12:41 +02:00
afb642b38d Wrap long lines in version's list of customized tables
Factor the wrapping print out of show_opts() into prwrap().  Use it
in show_custom().
2008-04-10 22:01:25 +02:00
16b811d4ac Work around strptime() lossage
Some losing implementations of strptime() such as FreeBSD's happily
succeed when they fully consumed the first argument, regardless of
whether they matched the full second argument or not.  This causes
lines without directives to be interpreted as "next Sunday".

Work around the lossage in parse_time().
2008-04-07 20:20:13 +02:00
Ron Koenderink
6942ea94dd Fix emp_server manual page synopsis for Windows
The -R option appears in the wrong place.
2008-04-07 08:30:43 +02:00
41cd0f0fe6 Bump client version to 4.3.13
This was forgotten in commit ef00d650 and commit 09c21f83.  The 4.2.12
client misidentified itself as 4.2.11.
2008-04-06 22:07:02 +02:00
8e354e56c0 Update change log for 4.3.13 2008-04-06 22:00:25 +02:00
a291e6dd23 Belatedly update c_form of xdump command
Update for commit da8a1dae, v4.3.12.
2008-04-06 21:52:33 +02:00
4f5e2119c6 Put MAXNOC in xdump version
Create virtual selector nsc_ver_maxnoc() for it.
2008-04-06 15:03:37 +02:00
2725d6e736 Doc fix: don't claim empdump doesn't exist yet 2008-04-06 14:48:12 +02:00
7a0252e40a Fix initialization of realms in newcap
Broken in commit e1a68c72, v4.3.12.
2008-04-06 09:49:47 +02:00
793cc220ec Fix add of for status arguments active, god, delete
Broken in commit e1a68c72, v4.3.12.
2008-04-06 09:18:56 +02:00
ef00d65051 Bump version to 4.3.13 2008-04-06 09:18:51 +02:00
01106d3024 Remove unused unit stat development macros
Commit 0219bf08 hid all of them them away, but used only some of them
in their new home.  Clean up.
2008-04-04 20:35:09 +02:00
b47617004a Update change log for 4.3.12 2008-04-02 07:36:47 +02:00
1f9e884525 Don't make more babies than food permits
babies() rounded the maximum number of babies permitted by food.  When
this rounded up, grow_people() could use more food than available, and
the sector's food could become negative.  Fix by always rounding down.
2008-04-01 20:05:10 +02:00
fc6f1da568 Doc fix 2008-03-28 20:53:22 +01:00
0d09bdc8dc Remove src/scripts/tag-changeling, it's specific to CVS 2008-03-28 20:52:31 +01:00
a7cf600abc Update documentation to talk about git instead of CVS 2008-03-28 20:42:49 +01:00
2f5cad1997 Revert "Use XYOFFSET() instead of sctoff() in sector iterators"
This reverts commit d2ca7d4ed2.

Turns out the arguments are not always normalized, e.g. after
snxtitem_all().
2008-03-28 07:17:17 +01:00
Ron Koenderink
9a4f49f128 Add missing thread yield system call.
This change fixes a bug where the threads were not treated
fairly.  Before the fix, empth_yield would only yield to
threads already waiting hThreadMutex mutex.  It would not
yield to other threads ready to run from the release of other
mutexes.  An example of this is that the update task did
not start when force command was issued from script sequence.
2008-03-27 20:07:11 -06:00
e89a4b5657 Revert "Fix update's resupply of food to avoid starvation"
This reverts commit 03811b2c97.

That "fix" could actually conjure up food.  The resupply doesn't wipe
out food, because it resuppies from the sector itself.
2008-03-26 22:13:21 +01:00
15109ebef0 Fix empdump to check for export write errors 2008-03-26 22:13:21 +01:00
e5ef3d4840 Pass struct natstr * instead of natid to virtual selectors
This is because we want to define them in src/lib/global/, and code
there can't use getnatp(), because that requires
src/lib/common/file.c.  Which renders a cnum parameter pretty useless.

Virtual selectors requiring code from common/ could well come up again
in the future, but let's not worry about that now.
2008-03-26 22:13:21 +01:00
44295e43af No need to assign uid after ef_blank()
The redundant assignments should have been removed in commit 2da8d0c7.
2008-03-26 22:13:21 +01:00
ae8e347ed6 Fix the obvious bogosities in info launch 2008-03-26 22:13:21 +01:00
d5c9cfec28 Check pln_airbase_ok() in msl_sel()
The lack of base checking there permitted ship and land unit missile
interdiction and ballistic missile interception without a proper base.
2008-03-26 22:13:21 +01:00
52b303498e Replace laun()'s base checking code by pln_airbase_ok()
This outlaws launch from unowned sectors.  Also, non-VTOL missiles
require an efficient airfield now, except that such missiles don't
exist currently, because init_plchr() makes all missiles VTOL.
2008-03-26 22:13:17 +01:00
9e90aa173a Change launch not to destroy missiles stuck on foreign ships
When laun() refused to launch a missile because of its carrier's
nationality, it destroyed the missile.  Don't do that.
2008-03-26 22:13:04 +01:00
8d62bdb360 Fix launch_as() to use up supplies only when actually launching 2008-03-26 22:13:04 +01:00
15fab1c9a5 Fix launch to require petrol for launching satellites
launch_sat() failed to call msl_equip().  Change msl_equip() to take
the mission character as argument, because the old hardcoded 'p' isn't
appropriate for satellites.  Best fit for satellites is 'r' for
reconnaissance, but mission_pln_equip() doesn't accept that
(pln_equip() does).  Fix that as well.
2008-03-26 22:13:00 +01:00
ee863c5d25 Fix empdump not to depend on POGO's origin
Treat NATID_BAD as deity with absolute coordinates in nstr_exec_val()
and xdinit().  Use that in dump_table().
2008-03-26 22:12:07 +01:00
9c2a05e126 Make xnorm() and ynorm() use XNORM() and YNORM()
They duplicated them before.
2008-03-26 22:12:03 +01:00
ae835ff1db Simplify xrel() and yrel()
Value of XNORM() and YNORM() is in [0,WORLD_X) and [0,WORLD_Y),
respectively.
2008-03-26 22:11:23 +01:00
5f76428524 Simplify XNORM() and YNORM()
Simplify (M - (n % M)) % M  to M - (n % M), for n < 0.
2008-03-26 22:11:23 +01:00
9c8109768d Use nstr_sect member id instead of recomputing it
bmnxtsct() sets it.  The old code recomputed it with sctoff() without
checking for failure.  Not a bug, because it can't actually fail, just
confusing.
2008-03-26 22:11:23 +01:00