Commit graph

1099 commits

Author SHA1 Message Date
5357aa15b9 (deli): Break the loop if player->aborted. Without that, it can
prompt for more input, violating the client protocol.
2005-09-23 17:37:28 +00:00
681a803ef6 (move): test command checked start sector for space and some other
things instead of end sector.

(move): test command now skips code dealing with return of goods to
start sector.

(want_to_abandon): Simplify.
2005-08-30 18:26:58 +00:00
a508a4c6e7 (do_conv): Use maximum population instead of 999 to limit number of
new uw.
2005-08-30 17:49:43 +00:00
41c67326bb (shoo): Remove the arbitrary limit of 999 people to be shot. 2005-08-30 17:47:40 +00:00
4474c7b5c1 (ltend): Fix printing of land unit in diagnostic message. 2005-08-30 17:38:27 +00:00
ff0d9dede6 (nbomb): Rev. 1.17 made a questionable initializer incorrect, and thus
broke pin-bombing for hosts where sizeof(i_type) != sizeof(int).  Fix.
2005-08-30 17:27:37 +00:00
Ron Koenderink
ef0dbf6790 (force): Change to create update thread instead of calling
empth_sleep() as the empth_sleep() can not be aborted for an update.
(update_force): New.
2005-08-20 19:16:56 +00:00
9bf3b1b64a (show_opts): New, factored out of vers(). Fix output punctuation.
(vers): Fix output punctuation and grammar.
2005-07-31 17:42:14 +00:00
786b34c693 (SHIPNAMES, opt_SHIPNAMES, Options, carg, name, sorde, qorde)
(show_sail, shi, att_get_combat, pr_com, satdisp, satmap, prship):
Remove nooption SHIPNAMES.
2005-07-31 17:22:32 +00:00
df8845199e (sorde): Output messed up for ships with sail path. Fix and
simplify.  Remove inappropriate ship sanity check, should be done
elsewhere, and differently.

(qorde): Fix the previous rev.
2005-07-31 16:35:30 +00:00
4c37776458 (qorde): Output messed up for ships with sail path. Fix and
simplify.  Remove inappropriate ship sanity check, should be done
elsewhere, and differently.
2005-07-31 16:19:03 +00:00
380b063f9c Remove some redundant parenthesis; no functional change. 2005-07-23 19:48:35 +00:00
c41c45be61 Delete some code that has been disabled out for ages and looks
useless or wrong.
2005-07-23 18:35:07 +00:00
022685c47c (sell): Prompting for `amount' is confusing: is it the amount of goods
to offer or amount of money to ask for?.  Ask for `quantity' instead.
2005-07-23 16:50:43 +00:00
be1147e7f0 (bdes): Prompt was messed up when bmap contained designation 0. 2005-07-23 16:47:08 +00:00
Ron Koenderink
6484e52678 (stre): Fix to make it match what happens in attack sequence: land
units do not react to a mountain.

(stre): Add an empth_yield() per sector to make the server responsive
to other players as this command is CPU intensive.
2005-07-23 13:44:47 +00:00
Ron Koenderink
e332ff5fcc (launch_sat): Incorrectly assumed that plane_mob_max is 127 when
calculating when the satellite will be ready for use.
2005-07-18 23:52:30 +00:00
0d57181966 Remove some dead, disabled code. 2005-06-23 19:21:18 +00:00
71e164ed30 Document, in particular use of UTF-8. Simplify code in a couple of
places, but no functional changes.
2005-06-13 19:02:49 +00:00
b5ff7e3beb (copy_ascii_no_funny, copy_utf8_no_funny)
(copy_utf8_to_ascii_no_funny): New.
(flash, wall, prmptrd, uprmptrd, getcommand): Use them to filter
input.
(uprnf, pr_flash): Use them to filter output.
(prtoascii): No longer used, remove.

(player_commands, player_commands_index): Internal linkage.
2005-06-13 18:16:44 +00:00
968e754447 (lrange, shoo, execute): Buffer passed to getstarg() was too small.
Player could overrun it!
2005-06-13 11:32:07 +00:00
ddfd5c1699 (play_list): player->combuf[] is user text and must be printed as
such.
(ufindbreak, ufindpfx): Rename, move to pr.c, external linkage.
2005-06-13 08:42:27 +00:00
24672e351b (shut): Buffer passed to getstarg() was much too small. Deity could
overrun it.

(shut): Fix retrieval of second argument.

(shut): Simplify formatting of broadcast messages.
2005-06-12 15:33:53 +00:00
cb454a1f56 (rea, turn): Use a different buffer for message text. Just for
clarity.
2005-06-12 10:11:04 +00:00
df0bbf5bd2 (turn): Buffer passed to getele() was one too small. Deity could
overrun it by entering a message of maximum size.
2005-06-12 09:38:30 +00:00
8585ec930f Remove some redundant casts. 2005-06-12 08:17:13 +00:00
4f59fc9967 Remove a bunch of redundant casts. 2005-06-12 06:31:48 +00:00
ee6d72f3b8 (rea): Portability fix. 2005-06-12 05:25:28 +00:00
e6ef2545bd (sendmessage): Skip players not in state PS_PLAYING. Flashes to them
get ignored, hence telling the player that the flash was sent is
wrong.  Skipping fixes that.
2005-06-09 22:28:54 +00:00
c051c5f58d (mobupdate): Don't print '\r' after '\n'. 2005-06-09 22:22:53 +00:00
aaf19dd6ab (play): Simplify counting of players. 2005-06-09 22:21:54 +00:00
Ron Koenderink
c3915edb54 (hidd,peek): Rename hidden command to peek.
This prevents a conflict in the info files with
HIDDEN option.
2005-06-01 12:26:22 +00:00
1ec5767d5f Doc & formatting fixes. 2005-05-30 15:03:24 +00:00
18ee9a2f35 (flee, army, wing): Print how many new members were added.
Previously, it printed how many were selected, which can include old
members of the group.

(flee, army): The rather obscure feature to assign the fleet's /
army's retreat orders to members was broken.  It ignored ownership,
and thus could copy some other player's retreat orders.  Abusable.
Copying the first member's retreat orders is less than useful, in
particular for group ~.  The code now chooses the first one in the
same sector with RET_GROUP set.  RET_GROUP is never set for group ~.
2005-05-30 14:56:02 +00:00
326ac671ba (EFF_OWNER): The assertion that EFF_OWNER implies ef_read() sets
player->owner is no longer used.  Use it to indicate that owner can be
accessed through struct genitem, similar to EFF_XY and EFF_GROUP.
(xdump): Fix ownership checking.  Old version worked only when
nxtitem() set player->owner.

(empfile): Set EFF_OWNER for EF_LOST.  This fixes `xdump lost'
disclosing other countries' losses.
(loststr): Document implications of EFF_OWNER.

(empfile): Set EFF_OWNER for EF_NATION.
(natstr): Rearrange members for EFF_OWNER, document.
(nat_ca): Unused so far.  Clean it up, add most missing selectors.
(fileinit): Use it.  This implements `xdump nation'.

(fileinit): Simplify setting map file size.
2005-05-29 14:14:33 +00:00
b111abc2c5 (nxtitem): Skipped unowned sectors (could not occur), ships, planes,
land units and nukes for selection type NS_LIST.  Thus, unowned items
explicitly selected by item number are skipped, while the same items
selected implicitely by group, area or whatever are not.  This makes
no sense.  Some callers break the nstr_item abstraction to prevent the
skipping, so they get all items regardless of how they were selected.
All other callers filter out unowned items.  This skipping misfeature
dates back to the very oldest known versions of Empire.  Remove it.
Also remove skipping prevention hacks from callers.

(tend_nxtitem): Now identical to nxtitem(), except it lacks some extra
normalization of item coordinates, which should have no effect.
Replace by nxtitem().
2005-05-29 13:15:56 +00:00
baf416652a Login options.
(player): New member flags.
(PF_UTF8, NF_UTF8): New PF_UTF8 replaces NF_UTF8.  Users changed.
(options_cmd): New.
(login_coms): New command `options'.
(toggle): Revert to the previous rev.
2005-05-27 16:31:19 +00:00
Ron Koenderink
2cc44bb182 Support UTF-8 encoded Unicode for user communications.
(NF_UTF8, togg): New client flag.
(flash, wall): User text input filtering.
(parse, prmptrd): Normal text input filtering.
(uprmptrd, ugetstring): New, to get user text.
(getele, flash, wall): Use them.
(getele): No need to filter out funny characters; input filtering
takes care of them.
(sendmessage, ufindbreak): Work on user text.
(uprnf): New, to print user text.
(rea, gamedown, show_motd): Use it.
(prnf): Unused, remove.
(pr, upr_player): Normal text output filtering (with highlighting).
(pr_flash): User text output filtering.
2005-05-26 01:58:48 +00:00
Ron Koenderink
dcd0794104 (build_bridge,build_tower,retreat_ship1): Mark "X" on sector
where mines were found when retreating.  Remove "X" when the
bridge span or tower is built.  Closes #1149809.
The bmap is now updated when the bridge span or tower is built.
A bulletin was added for when mines were swept when
retreating.
2005-05-08 18:39:09 +00:00
Ron Koenderink
9f27f5b02a (ship_grow_scale, plane_grow_scale, land_grow_scale): Change from int
to float.  This allows more control of the max. efficiency gain, and
makes it similiar to ship_mob_scale etc.  Closes #1025600.
2005-04-05 03:00:35 +00:00
44d59b5d17 (prod): All sectors produce when efficiency >=60%, not only enlistment
centers.
2005-04-04 18:54:14 +00:00
Ron Koenderink
953e5f6dc7 (xdprval): Only use of prnf() that is not for telegram text.
Replace by pr() in preparation of output conversion of telegram text
for the UTF-8 option.
2005-03-26 17:21:23 +00:00
Marc Olzheim
73a94a3591 (turn): Check whether fclose() succeeds. 2005-03-25 23:59:48 +00:00
Ron Koenderink
92ac36ec56 (rea): Set parameters for read to [yes|no|<CNUM/CNAME>].
Add parameters for read in the command list and the info pages.
Closes #1010010.
2005-03-25 21:04:39 +00:00
1c3eead016 Fix the previous rev. 2005-03-21 19:31:46 +00:00
b0e0c1b321 (prod): New column avail'. Narrow column will make' (amount and
short product name) to `make' (amount and, if product is an item,
product mnemonic).
2005-03-16 22:12:31 +00:00
345ad3dfe0 Update copyright notice. 2005-03-16 22:03:16 +00:00
6b68f73ca8 Doc fix. 2005-03-12 18:06:31 +00:00
0595ff4d4e Indentation fixes. 2005-03-12 15:05:23 +00:00
256724c39f (multifire, new): Reseeding the PRNG with the current time is not a
good idea.  Letting players trigger it is an extraordinarily bad idea.
Remove.
2005-03-11 17:01:38 +00:00