Commit graph

725 commits

Author SHA1 Message Date
ed5c1b00ee Remove dead code. 2004-08-17 18:59:52 +00:00
e1ebe41686 (M_TORP_SHELLS, SHP_TORP_SHELLS): Rename. 2004-08-17 18:45:04 +00:00
cdad6db4ac (pln_onewaymission, carriersatxy): Change to match ordinary sorties:
offer carriers regardless of the sector they're in, require carriers
to be efficient.  Closes #875376.
2004-08-17 18:34:53 +00:00
4fd7da248a (SHP_AIROPS_EFF, LND_AIROPS_EFF): New. Use it instead of literal 50. 2004-08-17 18:31:32 +00:00
90a61e245f (real): Support argument #' in addition to <NUMBER>' and
`#<NUMBER>'.
2004-08-17 17:12:44 +00:00
91c316afaa (msl_intercept): msl_hit() expects plain WHAT argument, without owner.
Passing it with owner gets the owner printed twice.  Fix.
2004-08-17 16:57:43 +00:00
8ef7f35a56 (V_CIVIL, V_MILIT, V_SHELL, V_GUN, V_PETROL, V_IRON, V_DUST, V_BAR,
V_FOOD, V_OIL, V_LCM, V_HCM, V_UW, V_RAD, V_ITEM): Remove, use item
types instead.
2004-08-17 16:12:31 +00:00
09def8f156 (show_sect_capab, V_ITEM): The difference between variable and
item types was removed some time ago.  Simplify.
(VT_ITEM, VT_TYPE, V_MAX): Unused, remove.

(show_sect_capab): Properly use ichr[] member i_mnem to print item
characters.
2004-08-17 16:07:01 +00:00
4d154753b8 (pchrstr, MAXPRCON): Simplify variable-style storage of constituents.
Store only up to MAXPRCON constituents, not MAXCHRNV; code doesn't
fully support more than three anyway.  Remove member p_nv, use item
type I_NONE for unused slots.  Rename members p_vtype, p_vamt to
p_ctype, p_camt to avoid confusion with variable-style storage.
(pchr): Initializers adapted.
(nullify_objects, materials_cost, materials_charge, prod,
show_sect_capab, grind): Adapt, simplify where possible, protect
against bad item types in pchr[].
(MAXCHRNV): Unused, remove.
2004-08-17 15:19:46 +00:00
15d4f89951 (max_pop): Clarify code. No functional changes. 2004-08-17 14:46:40 +00:00
921a55d508 (ldump, ndump, pdump, sdump): Remove leading spaces in deity dumps;
they waste bandwidth and don't match dump().
2004-08-17 14:44:06 +00:00
8a0854b6b8 (mchrstr, lchrstr): Change from variable-style storage of load
capacities to straight arrays.  Users now subscript the array instead
of calling vl_find() or walking the variable data structure.
(mchr, lchr): Initializers adapted.
(vl_find): No longer used.  Remove file.
2004-08-17 14:09:04 +00:00
Ron Koenderink
a965b2d25e (prod_eff): New, factored out of produce() and prod().
(upd_ship): Oil and food production used special rules that didn't
match ordinary production and didn't make much sense.  Made them
follow ordinary production rules.  This puts uw and mil to work, and
makes ship tech and efficiency relevant to production.  Closes #917461
and #955072.
2004-08-17 13:17:50 +00:00
09486ad3ed (lchr, pchr): Initializers depended on ETUS instead of etu_per_update.
ETUS is just the default for etu_per_update.  Deities don't change
ETUS, they change etu_per_update by editing econfig.  This nonsense
dates back at least to chainsaw 3.31, where it was just as broken as
now.  Replace ETUS by 60 and simplify.
2004-08-17 12:38:00 +00:00
Ron Koenderink
3ca767fc88 (prod_eff): New, factored out of produce() and prod().
(upd_ship): Oil and food production used special rules that didn't
match ordinary production and didn't make much sense.  Made them
follow ordinary production rules.  This puts uw and mil to work, and
makes ship tech and efficiency relevant to production.  Closes #917461
and #955072.
2004-08-17 02:31:10 +00:00
9f226fe05f 4.2.17 last minute changes. 2004-08-16 16:24:56 +00:00
20199b2236 (drop, fly): Fix previous rev. not to prohibit flying civilians to an
ally.  Since you can load them onto their ships, you should be able to
fly them over.
2004-08-16 14:35:06 +00:00
98a7936c08 Update for 4.2.17. 2004-08-14 20:03:08 +00:00
Ron Koenderink
1fcc9f68fd Added srand call to thread startup as each thread needs to be seeded in Windows. 2004-08-14 19:35:38 +00:00
d993fdef90 (pln_mine, pln_dropoff): Split off aerial mining into new pln_mine().
Callers changed.

(drop): Do not disclose anything about target sector before planes
actually got there, unless the target sector is owned by the player or
an ally.  This plugs a major loophole.  Consequently, the command can
no longer always refuse to attempt to drop stuff where it won't work.
Instead, the planes fly out to try.  Other plane commands (para, bomb)
behave exactly the same.  Also closes #909859.
(pln_dropoff): Cope with planes trying to drop where they can't.

(drop): Refuse to drop civilians into allied sectors, for consistency
with other means to move around stuff.
2004-08-14 17:12:20 +00:00
003e068615 Making directories worked only when CVS was the first sub-directory
found by find.
2004-08-14 08:23:37 +00:00
3588722250 (fly): Prohibit flying of civilians into occupied or allied sectors.
Before, civilians magically changed allegiance on disembarking planes.
2004-08-14 07:27:05 +00:00
a878a40a7b (fly): Failed to re-get target sector after asking for cargo, and thus
passed potentially invalid argument to pln_onewaymission().
2004-08-13 21:00:11 +00:00
1127762cc1 (pln_oneway_to_carrier_ok): New.
(fly, reco): Use it to prevent flying to a carrier that doesn't have
space for the planes.  Previously, planes that did this were
teleported home, which could be abused.

(fly): Fail if pln_sel() comes up empty, just like the other commands
to fly planes.
2004-08-13 20:22:03 +00:00
ab0d5a87bd (bomb): Don't tell the player that target is a sanctuary before his
planes got there.  This closes a loophole that allowed players with
any planes to find all sanctuaries.
2004-08-13 12:02:35 +00:00
73308d9c57 (move, explore): Return early when interdiction destroys everything
moved.  Without that, loyalty computation divided by zero and crashed
when moving civilians to a sector without civilians.  Found and
debugged by Jeff Cotter.  Closes #1005005.
2004-08-13 10:05:32 +00:00
9549adefdc No C99/C++ comments. 2004-08-13 09:57:58 +00:00
a5a8b52afd (gamedown): Printed down message with pr(), as a printf()-like format
string!  This reads and formats junk from the stack when message
contains '%', and can even crash.  Use prnf() instead.  Catched by Ron
Koenderink.
2004-08-10 13:34:41 +00:00
298ba998e4 (infect_people): Use max_pop() to compute space. This makes all
crowded sectors equally vulnerable, including mountains, plains, and
inefficient big cities.  Closes #917488.
Update info.
2004-08-10 07:56:34 +00:00
d721ba3b5c (show_motd): Printed motd with pr(), as a printf()-like format string!
This reads and formats junk from the stack when motd contains '%', and
can even crash.  Use prnf() instead.
2004-08-10 05:52:58 +00:00
Ron Koenderink
743be658c8 Don't drill (and deplete) more oil than the ship can hold.
Closes #955071.
2004-08-05 01:32:09 +00:00
8ce25abc1f (sarg_xy, sarg_getrange, sarg_range, sarg_list): These choke on
trailing junk since the previous rev.  That's too strict.  Silently
ignore trailing junk as long as it starts with whitespace.  That's
somewhat lax, but will do for now.  Closes #982018.
2004-08-04 20:04:37 +00:00
c8afd40eb8 (nstr_comp_val): Since rev. 1.10, selectors were always preferred to
type literals, unless type inference rejects the selector.  This
doesn't work for NSC_TYPE selectors: `?des=n' is interpreted as
`?des=newdes'.  Prefer type literal to NSC_TYPE selector.  Closes
#982021.
2004-08-04 14:47:24 +00:00
Marc Olzheim
153595a253 Now that src/scripts/nightly/patches/All/prng.patch:1.5 makes sure that
all randomness is predictable and repeatable, we're ready for some
real scripts.
2004-06-20 17:58:10 +00:00
Marc Olzheim
b464a4876e Four calls to random() fixed that escaped my previous patch to
emp_random().
2004-06-20 17:42:51 +00:00
Marc Olzheim
99187cd5fd Always seed with '1' instead of the supplied value of emp_srandom()
fot the nightly build.
2004-06-20 17:14:56 +00:00
Marc Olzheim
7877507f25 Make it possible to skip steps of the build by specifying so in the
environment variable "NIGHTLY_SKIP_STEP", making it easier to debug
problems in the build.
2004-06-20 16:36:51 +00:00
Marc Olzheim
58c93d2557 Instead of patching Make.sysdefs, introduce emp_{,s}random() and patch
all files to use it.  Output from the nightly build machines should
now be the same for the different platforms.
2004-06-20 15:30:41 +00:00
Marc Olzheim
788bae6c01 Use non-standard port for the nightly servers, so that the servers
do not conflict with other possible test servers.
2004-06-20 14:08:42 +00:00
Marc Olzheim
6e63f30d9f Make emp_client shut up about TERM variable. 2004-06-20 14:01:20 +00:00
Marc Olzheim
d35f51be90 Actually use the RANDOM defines and define NIGHTLY. Code is patched
into src/lib/gen/chance.c
2004-06-20 14:00:31 +00:00
Marc Olzheim
17c4546ec6 Make sure that the same prng is used on all systems, namely *rand48().
For now, only fairland.c is "fixed".  We'll have to patch the random
calls in the server to use the RANDOM and SRANDOM macros to make
things completely reproducible.
2004-06-19 13:54:49 +00:00
e68dba6d23 Update for 4.2.16. 2004-06-16 19:03:41 +00:00
Marc Olzheim
4c7eca14b5 Remove spurious "Clean sandbox"... 2004-06-16 18:54:36 +00:00
Marc Olzheim
d5b00ca908 Always report 0 minutes login time and 640 btus to ease diff-ing. 2004-06-16 18:32:46 +00:00
Marc Olzheim
5c4ec39dd2 Use "Thu Jan 1 00:00:00 GMT 1970\n" as output for the ctime() hack,
instead of an empty string.
2004-06-16 18:19:40 +00:00
1e6c4a7a5e New, more comprehensive guidelines. Compiled existing Empire
practice, rounded off with classical C usage, edited into a readable
form.  Work in progress.
2004-06-16 18:18:08 +00:00
Marc Olzheim
3629f0fe1e First step to add testing of the server to the nightlybuild.
For now, just some simple checks are added.
2004-06-16 16:06:17 +00:00
Marc Olzheim
7db0d77710 Patch to make ctime return "" for ease test output diff-ing. 2004-06-16 16:04:31 +00:00
d2dc791e44 (upd_buildeff): Previous revision broke work after sector
construction.  Closes #972065.
2004-06-15 19:52:14 +00:00