]> git.pond.sub.org Git - empserver/log
empserver
15 years agoImprove info on anti, bomb, lookout, starvation and sweep v4.3.15
Markus Armbruster [Sun, 18 May 2008 09:19:26 +0000 (11:19 +0200)]
Improve info on anti, bomb, lookout, starvation and sweep

Add command anti to subject Occupation, bomb to Combat, lookout to
Detection, and starvation to Updates.

Cross-reference recon from sweep.

15 years agoUpdate change log for 4.3.15
Markus Armbruster [Sun, 18 May 2008 09:01:32 +0000 (11:01 +0200)]
Update change log for 4.3.15

15 years agoUpdate known contributors comments
Markus Armbruster [Sun, 18 May 2008 08:59:04 +0000 (10:59 +0200)]
Update known contributors comments

15 years agoRemove edit country key 'U' deprecated in 4.3.10
Markus Armbruster [Sun, 18 May 2008 06:51:22 +0000 (08:51 +0200)]
Remove edit country key 'U' deprecated in 4.3.10

15 years agoAdd sequence numbers to game state
Markus Armbruster [Sat, 17 May 2008 20:44:00 +0000 (22:44 +0200)]
Add sequence numbers to game state

This oopses on output dependency violations, e.g. two threads doing a
read-modify-write without synchronization, or the one thread nesting
several read-modify-writes.  Such bugs are difficult to spot, and tend
to be abusable.  I figure we have quite a few of them.

New struct emptypedstr member seqno.  Make sure all members of unit
empobj_storage share it.  Initialize it in files: main() and
file_sct_init().  Set it in ef_blank() and new ef_set_uid() by calling
new get_seqno().  Use ef_set_uid() when copying objects: swaps(),
doland(), doship(), doplane(), dounit(), delete_old_news().  Step it
in ef_write() by calling new new_seqno().

Factor do_read() out of fillcache() to make it available for
get_seqno().

15 years agoSimplify write_sects() sector loop nest
Markus Armbruster [Sat, 17 May 2008 20:24:27 +0000 (22:24 +0200)]
Simplify write_sects() sector loop nest

No functional change.

15 years agoMake fairland obey file locks
Markus Armbruster [Sat, 17 May 2008 18:10:45 +0000 (20:10 +0200)]
Make fairland obey file locks

Do that by making it use file.h instead of stdio.

This doesn't overwrite the sector file completely anymore, it just
sets sct_type, sct_newtype, sct_elev and sct_coastal.  You really need
to run files first now.

15 years agoMake fairland finish argument parsing before reading econfig
Markus Armbruster [Sat, 17 May 2008 17:52:38 +0000 (19:52 +0200)]
Make fairland finish argument parsing before reading econfig

15 years agoFix files utility not to set timestamps
Markus Armbruster [Sat, 17 May 2008 17:35:22 +0000 (19:35 +0200)]
Fix files utility not to set timestamps

Commit f33b96b1 (v4.3.12) made files again set timestamps.  That was
intentionally suppressed in commit 990eb46b (v4.3.10), because it
facilitates attacks against the PRNG.  Commit 8f98e53a (v4.3.0) had
added it as a feature.

Fix by making files's main() pass new flag EFF_NOTIME to ef_open().
Implement the flag in do_write().

15 years agoSimplify empfile timestamping
Markus Armbruster [Sat, 17 May 2008 17:01:59 +0000 (19:01 +0200)]
Simplify empfile timestamping

do_write() sets the timestamp from a parameter.  All callers pass
time(), and don't use that value themselves.  Call time() in do_write
and remove the parameter.

15 years agoUpdate timestamps in privately mapped tables, too
Markus Armbruster [Sat, 17 May 2008 16:56:38 +0000 (18:56 +0200)]
Update timestamps in privately mapped tables, too

Commit f33b96b1 made ef_flush(), ef_write() and ef_extend() update
timestamps automatically.  Change ef_write() and ef_extend() to do
that even when table is privately mapped, by making do_write() cope
with privately mapped tables.  Current users don't care, but it's a
saner interface.

15 years agoFix ef_write() for privately mapped non-file-backed table
Markus Armbruster [Sat, 17 May 2008 16:48:48 +0000 (18:48 +0200)]
Fix ef_write() for privately mapped non-file-backed table

Commit f8dcb7b0 promised that combination to work, but got it wrong.
It hasn't been used, so no real harm done.

15 years agoMake server check game state file sizes on startup
Markus Armbruster [Sat, 17 May 2008 15:00:57 +0000 (17:00 +0200)]
Make server check game state file sizes on startup

Certain tables have a fixed size depending on configuration: EF_SECTOR
has WORLD_SZ() elements, EF_NATION, EF_MAP and EF_BMAP have MAXNOC
elements, and EF_REALM has MAXNOC * MAXNOR elements.  Bad things
happen if the files backing them are shorter.

Pass expected size to ef_open(), and make it fail when the actual size
differs.

15 years agoFix starvation not to starve one more than it should
Markus Armbruster [Sat, 17 May 2008 06:50:56 +0000 (08:50 +0200)]
Fix starvation not to starve one more than it should

Commit 109dad1b (v4.3.5) promised to round victim fractions down, but
got it wrong for odd population when exactly half of it rounded down
could be fed.  This could starve the last man on a boat or land unit.
Fix famine_victims().

15 years agoAdd command test to info subject Transportation
Markus Armbruster [Thu, 15 May 2008 17:41:32 +0000 (19:41 +0200)]
Add command test to info subject Transportation

15 years agoFix crash bug in satellite maps
Markus Armbruster [Tue, 13 May 2008 06:36:06 +0000 (08:36 +0200)]
Fix crash bug in satellite maps

The value of diffx() had the wrong sign when the arguments differed by
WORLD_X / 2.  Same for diffy() and WORLD_Y / 2.  satmap() used them to
find the vector from map center to ship or land unit to put on the
map, and got incorrect values for ships and land units directly
opposite to the center in x or y.  The bug made satmap() read a
pointer out bounds of its malloced radbuf[], and then write through
that with unpredictable consequences.

Broken in 4.2.12.  The original bug was in Empire 1.1: it
miscalculated where to put ships on the map (no crash).  An incomplete
fix for radmap() and satmap() appeared in Chainsaw 2 (still no crash).
radmap() got fixed correctly in Chainsaw 3, but satmap() was
forgotten.  That one got "fixed" in 4.2.7, and again in 4.2.12, but
both "fixes" were flawed and could crash.

Fix by backing out the flawed fixes and adopting the fix from radmap()
instead.

15 years agoFix XNORM() and YNORM()
Markus Armbruster [Mon, 12 May 2008 16:45:11 +0000 (18:45 +0200)]
Fix XNORM() and YNORM()

Broken in commit 5f764285 (v4.3.12) for negative multiples of WORLD_X
and WORLD_Y, respectively.

This could theoretically lead to buffer overruns and other
unpleasantness.  None have been reproduced, though.

15 years agoCatch selectors that make xundump oops early
Markus Armbruster [Mon, 12 May 2008 10:39:38 +0000 (12:39 +0200)]
Catch selectors that make xundump oops early

Oops in new verify_ca(), which runs during initialization.

15 years agoMake xundump oops on virtual selectors
Markus Armbruster [Mon, 12 May 2008 09:26:41 +0000 (11:26 +0200)]
Make xundump oops on virtual selectors

Commit da8a1dae (v4.3.12) introduced virtual selectors, but neglected
to update xundump.  Xundump can't work for them, because they don't
provide a setter method.

This didn't actually break anything, because all virtual selectors
have flag NSC_EXTRA set, or are in table EF_VERSION, which xundump
refuses to touch.

Make deffld() oops on virtual selector, just to be safe.

15 years agoRemove option FUEL
Markus Armbruster [Mon, 12 May 2008 07:25:20 +0000 (09:25 +0200)]
Remove option FUEL

The abstract idea of tying ships and land units to a logistical tether
is sound, the concrete implementation as option FUEL is flawed.  It
adds too much busy-work to the game to be enjoyable.  It hasn't been
enabled in a public game for years.  The code implementing it is ugly,
repetitive, and a burden to maintain.

Remove selector fuel from ship_ca[] and land_ca[], and selectors
fuelc, fuelu from mchr_ca[] and lchr_ca[].  Remove fields fuelc, fuelu
from ship.config and land.config.

Remove command fuel from player_coms[].

Deprecate edit key 'B' in doship(), dounit(), and don't show it in
pr_ship(), pr_land().

Drop opt_FUEL code from build_ship(), shi(), sdump(), ship_damage(),
show_ship_stats(), do_mob_ship(), nav_ship(), build_land(), land(),
ldump(), land_damage(), show_land_stats(), do_mob_land(),
resupply_all(), resupply_commod(), get_minimum(), has_supply(),
unit_list(), vers().

Remove opt_FUEL, fuel_mult, struct shpstr member shp_fuel, struct
mchrstr members m_fuelc and m_fuelu, M_OILER, struct lndstr member
lnd_fuel, struct lchrstr members l_fuelc and l_fuelu, fuel(), and
auto_fuel_ship().

15 years agoRemove unused num_shipsatxy()
Markus Armbruster [Sun, 11 May 2008 11:45:30 +0000 (13:45 +0200)]
Remove unused num_shipsatxy()

15 years agoFix pin bomb not to report subs when there are none
Markus Armbruster [Sun, 11 May 2008 11:43:26 +0000 (13:43 +0200)]
Fix pin bomb not to report subs when there are none

pin_bomb() computed the number of foreign subs as number of ships less
number of foreign surface ships.  This counted own surface ships as
subs.

Change it to count foreign subs directly.  Closes #906040.

However, shipsatxy(), the function for counting foreign ships, also
lists them.  Add a parameter to suppress that, and change its callers.

15 years agoDistinguish between sacking and obliterating a capital
Markus Armbruster [Sun, 11 May 2008 08:48:30 +0000 (10:48 +0200)]
Distinguish between sacking and obliterating a capital

Make caploss() transfer money, loans and market lots to the player
only if he actually took the capital, not if he obliterated it to
deity.

To make this work, caploss() needs to be called after the sector is
updated for damage and change of ownership.  Change callers
accordingly.

Closes #914049.

15 years agoFix transfer of loans and market lots on sack of capital
Markus Armbruster [Sun, 11 May 2008 08:30:32 +0000 (10:30 +0200)]
Fix transfer of loans and market lots on sack of capital

Fix caploss() to transfer only signed loans.  Before, it transferred
any loan with a non-zero duration, which included loan offers, and
could claim to tranfer nonexistent loans.

Fix caploss() not to claim transfer of nonexistant market lots when
country 0 sacks a capital.

15 years agoFix test for capital in caploss() to check country status
Markus Armbruster [Sun, 11 May 2008 08:20:40 +0000 (10:20 +0200)]
Fix test for capital in caploss() to check country status

Test for STAT_ACTIVE instead of non-zero country number.  Inactive
countries have no capital they could lose!

15 years agoRemove useless call of caploss() from detonate()
Markus Armbruster [Sun, 11 May 2008 08:05:25 +0000 (10:05 +0200)]
Remove useless call of caploss() from detonate()

The call has no effect, because by that time caploss() already ran
from sct_prewrite().

15 years agoStart the Empire clock on first break or update
Markus Armbruster [Sat, 10 May 2008 19:52:19 +0000 (21:52 +0200)]
Start the Empire clock on first break or update

Before, the Empire clock started at the epoch, which effectively made
it not tick before the first update.

15 years agoRemove useless sanctuary break logic from designate
Markus Armbruster [Sat, 10 May 2008 17:09:20 +0000 (19:09 +0200)]
Remove useless sanctuary break logic from designate

Don't call bsanct() when desi() is redesignating a sanctuary.  It's
pointless, because only deities can redesignate sanctuaries, and
bsanct() does nothing for them.

15 years agoFix some argument prompts to end in one space
Markus Armbruster [Sat, 10 May 2008 16:52:29 +0000 (18:52 +0200)]
Fix some argument prompts to end in one space

Corrects first argument of collect and show, and second argument of
assault, follow, mine, lmine and mobquota.

15 years agoFix edit l, s, u, p not to wipe out concurrent updates
Markus Armbruster [Sat, 10 May 2008 06:40:48 +0000 (08:40 +0200)]
Fix edit l, s, u, p not to wipe out concurrent updates

Make edit() bail out if the edited object changed while edit() slept
for input.

15 years agoFix xdump nat for relations
Markus Armbruster [Sat, 10 May 2008 06:36:45 +0000 (08:36 +0200)]
Fix xdump nat for relations

Commit ee863c5d (v4.3.12) got opt_HIDDEN backwards in nstr_exec_val().

15 years agoFix origin command not to prompt twice for its argument
Markus Armbruster [Wed, 7 May 2008 20:05:22 +0000 (22:05 +0200)]
Fix origin command not to prompt twice for its argument

Broken in commit b69173ee, v4.3.0.

15 years agoBump version to 4.3.15
Markus Armbruster [Wed, 7 May 2008 19:58:15 +0000 (21:58 +0200)]
Bump version to 4.3.15

15 years agoAvoid compiler warning v4.3.14
Markus Armbruster [Mon, 5 May 2008 19:54:02 +0000 (21:54 +0200)]
Avoid compiler warning

15 years agoUpdate change log again for 4.3.14
Markus Armbruster [Mon, 5 May 2008 04:45:02 +0000 (06:45 +0200)]
Update change log again for 4.3.14

15 years agoFix fire not to disclose retreat and wipe out target shell use
Markus Armbruster [Sun, 4 May 2008 19:58:29 +0000 (21:58 +0200)]
Fix fire not to disclose retreat and wipe out target shell use

multifire() clobbered any changes to the target ship or sector made by
defend().  This let the target fire back for free.

multifire() retreated the target ship before reporting its location to
the player.  This disclosed its new location.

Fix by damaging and retreating the target after calling defend().

15 years agoChange fire to always fire guns when the target is beyond range
Markus Armbruster [Sun, 4 May 2008 17:35:14 +0000 (19:35 +0200)]
Change fire to always fire guns when the target is beyond range

multifire() drops depth charges if the target is a submarine, else it
fires guns.  It fails if the target is out of range.  But players
could still find out whether the target is a sub then, because depth
charge shell use differs from gun fire shell use.  This loophole
existed before 4.0.6, and was reopened by commit a3ad623b (v4.3.12).

Change multifire() to always use guns if the target is out of range.

While there, treat failure from shp_dchrg() and shp_fire() the same,
so that the player can't distinguish the two cases.  Failure there
should not happen.

15 years agoMake depth charges work with just one shell
Markus Armbruster [Sun, 4 May 2008 17:02:15 +0000 (19:02 +0200)]
Make depth charges work with just one shell

Commit a3ad623b (v4.3.12) made depth charging fail when there's just
one shell.  This let players find all submarine uids.  It basically
reopened the loophole closed in commit aa26c53e (v4.2.20).

Fix by making shp_dchrg() with just one shell succeed and return
damage like fire from one gun.

15 years agoFix fire command to detect when the firing object changes
Markus Armbruster [Sun, 4 May 2008 14:44:26 +0000 (16:44 +0200)]
Fix fire command to detect when the firing object changes

multifire() failed to take into account that the firing firing sector,
ship or land unit can change while it is getting the target argument.
It thus clobbered any updates made to the firing object while it was
sleeping for the target argument.  Abusable.  Broken when Chainsaw
introduced MULTIFIRE.

15 years agoFix parsing of anchor-relative time in update schedule
Markus Armbruster [Sun, 4 May 2008 07:51:08 +0000 (09:51 +0200)]
Fix parsing of anchor-relative time in update schedule

Commit 16b811d4 (v4.3.13) broke parse_time().

15 years agoUpdate change log again for 4.3.14.
Markus Armbruster [Tue, 29 Apr 2008 20:08:03 +0000 (22:08 +0200)]
Update change log again for 4.3.14.

15 years agoJournal input of special cookies "ctld" and "aborted"
Markus Armbruster [Tue, 29 Apr 2008 19:42:17 +0000 (21:42 +0200)]
Journal input of special cookies "ctld" and "aborted"

The latter is necessary to interpret the journal correctly.  The
former isn't, as it should always lead to a logout straight away, but
treating it just the same is simple and doesn't hurt.

15 years agoRewrite recvclient() for clarity
Markus Armbruster [Tue, 29 Apr 2008 19:28:28 +0000 (21:28 +0200)]
Rewrite recvclient() for clarity

Behavior differs for the following scenario: if, while the thread
sleeps in io_input() called from recvclient(), at least one line of
input arrives and the thread gets awakened by the update aborting
commands, then the old code throws away the first line of input, but
the new code doesn't.

15 years agoFix launch not to report the same ship sunk twice
Markus Armbruster [Tue, 29 Apr 2008 19:10:33 +0000 (21:10 +0200)]
Fix launch not to report the same ship sunk twice

This happened when a marine missile with a conventional warhead sunk
its target.

15 years agoOops on nuclear-tipped anti-sat missiles
Markus Armbruster [Tue, 29 Apr 2008 19:01:54 +0000 (21:01 +0200)]
Oops on nuclear-tipped anti-sat missiles

Anti-sat code is not prepared to deal with nuclear damage.  The arm
command refuses to arm anti-sats, but better check.

15 years agoFix bugs in tracking of planes flying a sortie
Markus Armbruster [Tue, 29 Apr 2008 18:53:35 +0000 (20:53 +0200)]
Fix bugs in tracking of planes flying a sortie

Commit 7ca4f412 fixed tracking of planes flying a sortie by marking
them with flag PLN_LAUNCHED.  It failed to write SAMs and planes
flying missions back to the plane file, in sam_intercept() and
mission_pln_arm().  The only known problem with that is fairly
harmless: when the mission damages planes on the ground, the planes
flying it get damaged as if they were still sitting in their bases,
but the damage gets wiped out when they land.

The same issue applies to missiles.  So they need to be tracked as
well.  Do that in msl_hit().

While there, remove a few redundant PLN_LAUNCHED sanity checks.

15 years agoWrite planes fixed on game start to disk properly
Markus Armbruster [Tue, 29 Apr 2008 18:38:10 +0000 (20:38 +0200)]
Write planes fixed on game start to disk properly

When fixing planes stuck in the air, we fixed them only in memory, so
when a fixed plane wasn't written to disk for other reasons before the
next game start, it had to be fixed again.

Change pln_zap_transient_flags() to write them out.

15 years agoDon't let hardened missiles be loaded on ships or land units
Markus Armbruster [Mon, 28 Apr 2008 20:30:19 +0000 (22:30 +0200)]
Don't let hardened missiles be loaded on ships or land units

Fix load_plane_ship() and load_plane_land() to reject hardened planes.

15 years agoDon't let missiles loaded on land units be hardened
Markus Armbruster [Mon, 28 Apr 2008 20:27:54 +0000 (22:27 +0200)]
Don't let missiles loaded on land units be hardened

hard() already rejected missiles loaded on ships, but missed land
units.

15 years agoDocument what happens when the update aborts commands
Markus Armbruster [Mon, 28 Apr 2008 20:24:36 +0000 (22:24 +0200)]
Document what happens when the update aborts commands

15 years agoRevert "(prmptrd, uprmptrd): Should not be called while player->aborted. Check."
Markus Armbruster [Mon, 28 Apr 2008 20:22:18 +0000 (22:22 +0200)]
Revert "(prmptrd, uprmptrd): Should not be called while player->aborted.  Check."

This reverts commit fee8ac9d8f519649ad72129cae9ffb3bbd5d7ffb.

These *are* called while player->aborted.  Could be avoided, but: the
reason for not wanting to prompt then is to have each prompt consume a
line of input.  That's actually not feasible, because when we wait for
an argument (after prompting for it) when the update aborts commands,
we can't consume the argument we prompted for.

15 years agoFix lnd_fire() ammo sanity check
Markus Armbruster [Sat, 26 Apr 2008 08:15:05 +0000 (10:15 +0200)]
Fix lnd_fire() ammo sanity check

Checking l_ammo before lnd_dam() oopses when something attempts to
fire from a land unit type that can't fire (l_dam == 0) and uses no
ammo.  Such usage is perfectly fine.  Move the check to the correct
place.

15 years agoUpdate change log for 4.3.14
Markus Armbruster [Fri, 25 Apr 2008 20:28:40 +0000 (22:28 +0200)]
Update change log for 4.3.14

15 years agoA script for post_crash_dump_hook
Markus Armbruster [Fri, 25 Apr 2008 20:13:08 +0000 (22:13 +0200)]
A script for post_crash_dump_hook

15 years agoNew post_crash_dump_hook
Markus Armbruster [Fri, 25 Apr 2008 20:12:22 +0000 (22:12 +0200)]
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.

15 years agoDetect and log errors in crash_dump()
Markus Armbruster [Fri, 25 Apr 2008 20:09:52 +0000 (22:09 +0200)]
Detect and log errors in crash_dump()

15 years agoMove oops actions from log.c up to application
Markus Armbruster [Fri, 25 Apr 2008 18:20:07 +0000 (20:20 +0200)]
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.

16 years agoGive try_supply_commod() internal linkage
Markus Armbruster [Tue, 22 Apr 2008 19:56:35 +0000 (21:56 +0200)]
Give try_supply_commod() internal linkage

16 years agoNew server option -E to choose what to do on oops
Markus Armbruster [Mon, 21 Apr 2008 19:35:46 +0000 (21:35 +0200)]
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.

16 years agoFlush every journal entry even when not in debug mode
Markus Armbruster [Mon, 21 Apr 2008 18:42:50 +0000 (20:42 +0200)]
Flush every journal entry even when not in debug mode

Somewhat wasteful, but useful in case of a crash.

16 years agoDon't let trains load trains
Markus Armbruster [Fri, 18 Apr 2008 19:26:15 +0000 (21:26 +0200)]
Don't let trains load trains

Doesn't affect the stock game, because its only train is heavy.

16 years agoAllow deity to display power report for all types of countries
Ron Koenderink [Sat, 19 Apr 2008 03:32:46 +0000 (21:32 -0600)]
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.

16 years agoFix designate's check for disallowed sector types
Markus Armbruster [Wed, 16 Apr 2008 05:45:07 +0000 (07:45 +0200)]
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.

16 years agoBump version to 4.3.14
Markus Armbruster [Wed, 16 Apr 2008 05:38:39 +0000 (07:38 +0200)]
Bump version to 4.3.14

16 years agoFinal polish for 4.3.13 v4.3.13
Markus Armbruster [Tue, 15 Apr 2008 19:04:03 +0000 (21:04 +0200)]
Final polish for 4.3.13

16 years agoFix documented syntax of edit command.
Markus Armbruster [Tue, 15 Apr 2008 18:57:28 +0000 (20:57 +0200)]
Fix documented syntax of edit command.

While there: editing nukes isn't implemented, don't advertise it.

16 years agoDocument that nukes can be traded
Markus Armbruster [Tue, 15 Apr 2008 18:34:42 +0000 (20:34 +0200)]
Document that nukes can be traded

16 years agoFix and polish comments emitted by pconfig
Markus Armbruster [Tue, 15 Apr 2008 18:29:29 +0000 (20:29 +0200)]
Fix and polish comments emitted by pconfig

16 years ago4.3.13 late changes
Markus Armbruster [Fri, 11 Apr 2008 20:12:41 +0000 (22:12 +0200)]
4.3.13 late changes

16 years agoWrap long lines in version's list of customized tables
Markus Armbruster [Thu, 10 Apr 2008 20:01:25 +0000 (22:01 +0200)]
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().

16 years agoWork around strptime() lossage
Markus Armbruster [Mon, 7 Apr 2008 18:20:13 +0000 (20:20 +0200)]
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().

16 years agoFix emp_server manual page synopsis for Windows
Ron Koenderink [Sun, 6 Apr 2008 20:58:13 +0000 (14:58 -0600)]
Fix emp_server manual page synopsis for Windows

The -R option appears in the wrong place.

16 years agoBump client version to 4.3.13
Markus Armbruster [Sun, 6 Apr 2008 20:07:02 +0000 (22:07 +0200)]
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.

16 years agoUpdate change log for 4.3.13
Markus Armbruster [Sun, 6 Apr 2008 20:00:25 +0000 (22:00 +0200)]
Update change log for 4.3.13

16 years agoBelatedly update c_form of xdump command
Markus Armbruster [Sun, 6 Apr 2008 19:52:33 +0000 (21:52 +0200)]
Belatedly update c_form of xdump command

Update for commit da8a1dae, v4.3.12.

16 years agoPut MAXNOC in xdump version
Markus Armbruster [Sun, 6 Apr 2008 13:03:37 +0000 (15:03 +0200)]
Put MAXNOC in xdump version

Create virtual selector nsc_ver_maxnoc() for it.

16 years agoDoc fix: don't claim empdump doesn't exist yet
Markus Armbruster [Sun, 6 Apr 2008 12:48:12 +0000 (14:48 +0200)]
Doc fix: don't claim empdump doesn't exist yet

16 years agoFix initialization of realms in newcap
Markus Armbruster [Sun, 6 Apr 2008 07:49:47 +0000 (09:49 +0200)]
Fix initialization of realms in newcap

Broken in commit e1a68c72, v4.3.12.

16 years agoFix add of for status arguments active, god, delete
Markus Armbruster [Sun, 6 Apr 2008 07:16:09 +0000 (09:16 +0200)]
Fix add of for status arguments active, god, delete

Broken in commit e1a68c72, v4.3.12.

16 years agoBump version to 4.3.13
Markus Armbruster [Sun, 6 Apr 2008 05:33:14 +0000 (07:33 +0200)]
Bump version to 4.3.13

16 years agoRemove unused unit stat development macros v4.3.12
Markus Armbruster [Fri, 4 Apr 2008 18:35:09 +0000 (20:35 +0200)]
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.

16 years agoUpdate change log for 4.3.12
Markus Armbruster [Wed, 2 Apr 2008 05:36:47 +0000 (07:36 +0200)]
Update change log for 4.3.12

16 years agoDon't make more babies than food permits
Markus Armbruster [Sun, 30 Mar 2008 16:28:07 +0000 (18:28 +0200)]
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.

16 years agoDoc fix
Markus Armbruster [Fri, 28 Mar 2008 19:53:22 +0000 (20:53 +0100)]
Doc fix

16 years agoRemove src/scripts/tag-changeling, it's specific to CVS
Markus Armbruster [Fri, 28 Mar 2008 19:52:31 +0000 (20:52 +0100)]
Remove src/scripts/tag-changeling, it's specific to CVS

16 years agoUpdate documentation to talk about git instead of CVS
Markus Armbruster [Fri, 28 Mar 2008 19:42:49 +0000 (20:42 +0100)]
Update documentation to talk about git instead of CVS

16 years agoRevert "Use XYOFFSET() instead of sctoff() in sector iterators"
Markus Armbruster [Fri, 28 Mar 2008 06:17:17 +0000 (07:17 +0100)]
Revert "Use XYOFFSET() instead of sctoff() in sector iterators"

This reverts commit d2ca7d4ed2c9ab03ba20a18fa53613d7baaa9026.

Turns out the arguments are not always normalized, e.g. after
snxtitem_all().

16 years agoAdd missing thread yield system call.
Ron Koenderink [Fri, 28 Mar 2008 02:07:11 +0000 (20:07 -0600)]
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.

16 years agoRevert "Fix update's resupply of food to avoid starvation"
Markus Armbruster [Wed, 26 Mar 2008 21:00:35 +0000 (22:00 +0100)]
Revert "Fix update's resupply of food to avoid starvation"

This reverts commit 03811b2c97d9537cfeaf4e5a6726002b0b0d6b78.

That "fix" could actually conjure up food.  The resupply doesn't wipe
out food, because it resuppies from the sector itself.

16 years agoFix empdump to check for export write errors
Markus Armbruster [Tue, 25 Mar 2008 20:39:27 +0000 (21:39 +0100)]
Fix empdump to check for export write errors

16 years agoPass struct natstr * instead of natid to virtual selectors
Markus Armbruster [Tue, 25 Mar 2008 20:36:52 +0000 (21:36 +0100)]
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.

16 years agoNo need to assign uid after ef_blank()
Markus Armbruster [Mon, 24 Mar 2008 17:40:06 +0000 (18:40 +0100)]
No need to assign uid after ef_blank()

The redundant assignments should have been removed in commit 2da8d0c7.

16 years agoFix the obvious bogosities in info launch
Markus Armbruster [Mon, 24 Mar 2008 16:35:29 +0000 (17:35 +0100)]
Fix the obvious bogosities in info launch

16 years agoCheck pln_airbase_ok() in msl_sel()
Markus Armbruster [Mon, 24 Mar 2008 16:35:23 +0000 (17:35 +0100)]
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.

16 years agoReplace laun()'s base checking code by pln_airbase_ok()
Markus Armbruster [Mon, 24 Mar 2008 16:17:53 +0000 (17:17 +0100)]
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.

16 years agoChange launch not to destroy missiles stuck on foreign ships
Markus Armbruster [Mon, 24 Mar 2008 16:11:03 +0000 (17:11 +0100)]
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.

16 years agoFix launch_as() to use up supplies only when actually launching
Markus Armbruster [Mon, 24 Mar 2008 15:24:42 +0000 (16:24 +0100)]
Fix launch_as() to use up supplies only when actually launching

16 years agoFix launch to require petrol for launching satellites
Markus Armbruster [Mon, 24 Mar 2008 15:23:03 +0000 (16:23 +0100)]
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.

16 years agoFix empdump not to depend on POGO's origin
Markus Armbruster [Mon, 24 Mar 2008 14:06:36 +0000 (15:06 +0100)]
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().

16 years agoMake xnorm() and ynorm() use XNORM() and YNORM()
Markus Armbruster [Mon, 24 Mar 2008 13:13:58 +0000 (14:13 +0100)]
Make xnorm() and ynorm() use XNORM() and YNORM()

They duplicated them before.