(retreat_ship1): Fix test for seamines. Before, retreating ships
could sweep and hit landmines. The bug fixed in rev. 1.35 is believed
to have masked this bug. Charge mobility for sweeping. Closes
#1346756.
(MINE_LDAMAGE): Change to match damage suffered in lnd_hit_mine().
This increases damage suffered in retreat. Fix info Damage.
(shp_hit_mine): Use MINE_DAMAGE().
(lnd_hit_mine): Use MINE_LDAMAGE().
(retreat_ship1): Fix sector ownership test. Before, retreating ships
could enter sectors owned by whoever caused the retreat, but not own
sectors. Reported by Ray Hyatt. Closes #1346750.
(tran_map): Set player->argp[0]. Required since bmap() was merged
into map() ca. 1995. Fixes 'm' at test's move_ground() prompt.
Simplify clearing player->argp[2]. Don't clear beyond that.
(tran_map): Set player->argp[0]. Required since bmap() was merged
into map() ca. 1995. Clear player->argp[2]. Required since map
acquired its second argument in the early 90s. Fixes 'm' at
transport's move_ground() prompt.
(unit_map): Don't use snxtsct(), it obeys conditionals. Use
snxtsct_area(). Callers march() and navi() clearly don't want it to
use conditionals. navi() used to zap them (just removed). march()
doesn't, which was a bug similar to #785447. It's less clear for
caller map(). I'd argue that conditionals apply to map's argument,
the unit number, not to the map itself. draw_map() zaps them anyway.
(explore_map, nav_map, move_map, fly_map): Don't use snxtsct(), it
obeys conditionals. Use snxtsct_dist(). Closes #785447. Only march
and test were actually broken, the other uses zapped conditionals.
(move_map, fly_map, nav_map, navi): Don't zap conditionals.
(retreat_ship1, retreat_land1): Use snxtitem_group() instead of
snxtitem() for RET_GROUP. The latter uses player->condarg, which lets
crafty attackers suppress retreat.
(shut): Fix misuse of logerror(): passed formatted string instead of
format string and arguments. Correctness depends on formatted string
not containing '%', which is the case.
(show_sail): Fix misuse of pr(): passed formatted string instead of
format string and arguments. Correctness depends on paths not
containing '%', which is correct, but not as robust as it could be.
(show_nuke_capab, show_ship_capab, show_plane_capab, show_land_capab)
(prxy, border, ac_encounter, look, budg): Fix misuse of pr() and PR():
passed formatted string instead of format string and arguments.
Correctness depends on argument values and tables not containing '%',
which is correct, but fragile.
(comm_bomb, ship_bomb, land_bomb, pinflak_planedamage): Fix dangerous
misuse of pr(), PR() and mpr(): passed formatted string instead of
format string and arguments. Crash bug if formatted string contains
'%'. Players can put that in ship names...
(prunits, prplanes): Simplify, compute relation string instead of
format.
(prplanes): Fix dangerous misuse of pr(): passed formatted string
instead of format string and arguments. Crash bug if formatted string
contains '%'. Players can put that in country names...
(gift, load_comm_ship, load_comm_land): Fix dangerous misuse of wu():
passed formatted string instead of format string and arguments. Crash
bug if formatted string contains '%'. Players can put that in ship
names...
(build_ship, build_land, build_plane): Compute cost in floating-point.
It's better to round just once, when subtracting player->dolcost from
nat_money.
(build_can_afford): New.
(build_ship, build_land, build_bridge, build_nuke, build_plane)
(build_tower): Use it. This changes some messages. Fixes ancient
bridge building race condition: while prompting for direction, another
build could clobber cash.
(cash): Remove.
(u_char, u_short, u_int): BSDisms. Figuring out whether sys/types.h
defines them would be possible, but isn't worth the trouble. Replace
by unabbreviated types.
(do_conv, enli, explore, move, shoo, s_commod): sct_mobil was changed
from u_char to short in 3.0.0, but many assignments still cast to
u_char. Remove casts.
MSYS ships an obsolete version of GNU make which doesn't grok
order-only prerequisites. They were used to make directories
info.html, info.nr, lib. Make them ahead of time, in configure. Also
fixes distclean not removing them.