Commit Graph
710 Commits
Author SHA1 Message Date
Goober5000 6fb72499f9 make all the error messages consistent 2022-06-30 03:15:53 -04:00
Goober5000 eb69133a57 refine SEXP error reporting
Sync the "mission save" and "error reporting" versions of the SEXP variable string.  Also use `stuff_sexp_text_string` to print the "bad node" token rather than `Sexp_nodes[bad_node].text`, so that a human-readable token is displayed instead of a magic number like 26.

Related to #4226, as the generated error message is formatted differently enough to be confusing.
2022-06-30 02:50:08 -04:00
Goober5000 1b563360ed Merge pull request #4401 from Goober5000/add_isActive_checks
add isActive checks for new-style script hooks
2022-06-16 19:42:36 -04:00
John Fernandez 6098675cc0 A docked standalone ship is not possible. 2022-06-14 09:49:18 -04:00
John Fernandez 01331436c9 Fix the standalone ship being added to ship list
While it may seem counterintuitive, we have to keep the standalone bogus ship from being added to the ship list so that we don't have to exclude it from all the places it could cause crashes or mysterious AI behaviors.  Both were being observed, and this should fix them.
2022-06-13 21:39:03 -04:00
Goober5000 7013981de5 add isActive checks for new-style script hooks
What it says on the tin.  Follow-up to #3538.  Fixes #4398.
2022-06-13 02:13:14 -04:00
JohnAFernandez 2004d00588 Merge pull request #4144 from JohnAFernandez/Interpolation-Overhaul2
Interpolation Overhaul 2
2022-06-05 00:55:09 -04:00
JohnAFernandez 6baadfef6f Merge pull request #4306 from BMagnu/de_bitfieldify_player_orders
De-Bitfield-y Player Orders
2022-06-05 00:54:55 -04:00
JohnAFernandez 88c788a7b4 Interpolation Overhaul
Add files to partition interpolation code, base interpolation timing on Missiontime on remote instance vs. Mission time on the local instance.
2022-06-04 12:55:13 -04:00
Birk Magnussen e3544e687e Free up order 0 for no-order 2022-05-31 21:36:22 +02:00
MageKing17 8c1693df46 Remove pointless assertion in mission parsing.
When parsing escort priority, FSO asserts that the escort flag is set,
but this assertion is only valid in missions output by FRED; it's fairly
trivial to use notepad to remove the flag without removing escort
priority, thereby triggering the assertion. Furthermore, there doesn't
actually seem to be a problem if a parse object has an escort priority
without the escort flag; the engine won't actually use the priority
until/unless the ship is manually added to the escort list, and then it
doesn't matter that one is set.
2022-05-29 12:04:21 -07:00
Birk Magnussen 3f227e7eeb Incorporate Feedback 2022-05-29 10:48:10 +02:00
BMagnu e22b8e44b7 Fix for real now (#4312) 2022-05-26 21:46:38 +09:00
BMagnu 6ef7616dcc Fix orders accepted list parse (#4310) 2022-05-25 19:05:47 +00:00
BMagnu 7155163223 Remove bitfield indexed player orders 2022-05-24 13:38:56 +02:00
BMagnu f707d471da Replace +Orders Accepted: Bitfield with flag list (#4282)
* Deprecate '+Orders Accepted:' Bitfield

* Add retail compat mode
2022-05-19 06:24:02 +09:00
Goober5000 3d646e591d Merge pull request #4258 from Baezon/fix-sun-position-compensation-math
Correct sun position compensation math
2022-05-12 20:02:05 -04:00
Asteroth 2e37aceab9 correct sun math 2022-05-11 14:13:39 -04:00
Goober5000 b404b137a0 guard against off-by-one errors in replace_one and replace_all
Also add some test cases for checking correct behavior.
2022-05-07 15:08:21 -04:00
Goober5000 bb2bd3fc1d Merge pull request #4186 from Goober5000/fred_background_angle_fix
background bitmap fix
2022-05-06 18:43:38 -04:00
Goober5000 4c948569c8 address feedback 2022-05-03 22:22:25 -04:00
Goober5000 30c168693b change 'fixed' to 'corrected' 2022-05-01 23:07:04 -04:00
Goober5000 ca6a9017c6 patch the freeing of SEXP nodes
Followup to #4088.  A few calls of `free_sexp` (especially in `free_sexp2`) did not supply the calling node, which left inconsistent SEXP tree structures and caused a crash in TranscendE1M6.  This fixes the crash and fills in some of these places.
2022-04-24 20:41:03 -04:00
Kiloku dca2ae715f Add a ship flag to allow the firing fail sound to play with locked primaries (#4203)
* Add a flag to allow the firing fail sound to play with locked primaries

* Adds an equivalent flag for Secondaries

* Make the flags accessible to FRED

* Fix whitespace mistakes

* Yet another whitespace fix

* Move primary fail sound flag check up to avoid wasting processing with unused shots

* Move secondary locked check up to avoid doing unnecessary checks
2022-04-24 13:09:50 -04:00
Goober5000 fa4c66dfac consolidate angle fixes into stars_fix_background_angles; add new script and sexp functions that use correct angles 2022-04-20 15:55:33 -04:00
wookieejedi 87ed583b28 Fix FRED accessibility of new flag ai-attackable-if-no-collide (#4189)
PR #4174 added this feature, this PR allows it to be useable with FRED.
2022-04-20 15:26:05 -04:00
JohnAFernandez 1396d44265 Basic Implementation for Attackable_if_no_collide (#4174)
A work-around for the default behavior where turrets will ignore ships that have no-collide set.  This allows turrets to target such ships.
2022-04-19 16:54:04 -05:00
Asteroth 527b46443b background bitmap fix, part 2
Uses simpler and more correct math for bg bitmap angles, and when old values are parsed, they are translated into correct values
2022-04-19 02:09:44 -04:00
Goober5000 f7dd1172c6 background bitmap fix, part 1
Adds the framework for loading and saving backgrounds with correct or incorrect angles.  Backgrounds in FSO will all have fixed angles internally, and newly created backgrounds in FRED will have fixed angles, but existing mission files will have incorrect angles.  The parser will determine whether the mission file contains fixed or unfixed angles and act accordingly.  (Actually fixing the angles will be done in part 2.)
2022-04-18 23:50:54 -04:00
Goober5000 7aaca0a84a Merge pull request #4127 from Goober5000/spooled_music_vector
vectorize Soundtracks and Spooled_music
2022-04-05 14:21:18 -04:00
Goober5000 493c9e004f add flags to keep same warp effects when docked
Same arrival warp when docked, same departure warp when docked, and associated changes to FRED, set-arrival-info, and set-departure-info.

Also fixes the nav-carry flag to properly save when a mission is saved.  Previously that flag would always be cleared.

Implements feature from #4095.
2022-04-04 12:31:03 -04:00
Goober5000 3acf2d69b0 vectorize Soundtracks and Spooled_music
This removes the limits on soundtracks and menu music.  Some design tweaks are thrown in as well.
2022-04-02 00:52:43 -04:00
Goober5000 d92e8f4155 add nebula fog color override, plus missionsave support which wasn't implemented before 2022-03-22 10:27:22 -04:00
Goober5000 1b69e6e3ad fix an edge case for ships destroyed before mission
Make sure the ship registry correctly records these ships as having exited.
2022-02-19 19:46:33 -05:00
Goober5000 8e2e825204 add UI_TIMESTAMP type and switch some timestamps to use it 2022-02-12 19:01:15 -05:00
wookieejedi 795947a606 Enable Use Cargo Icon for briefing icons (#3964) 2022-01-26 17:33:41 -05:00
BMagnu dc6cd40541 Clean up Player_orders (#3918)
* Merge all three comm_order arrays

Were Comm_orders, Sexp_comm_orders, and Player_orders. Now all Player_orders.

* Fix Warnings

* Fix erroneous order warning

* Update Int3 into a warning

* Fix missing location for warning
2022-01-22 22:09:49 +09:00
Goober5000 9e149ff467 set the flag if a ship uses a Knossos warpin or warpout effect 2022-01-19 19:31:28 -05:00
Goober5000 32e1194575 change int to bool 2022-01-19 01:35:32 -05:00
wookieejedi 77c7b0271e Fix incorrect net signature for wave ships (#3924)
Previously, multiplayer missions with wings with waves would incorrectly set the `net_signature` of ships in the initial wave. The code is supposed to only set the `net_signature` if it was past the initial wave. This is because original ships in the wave have their `net signature` set at mission parse.

This PR fixes that and has been confirmed to work via multiplayer tests.
2022-01-14 22:02:38 -05:00
Goober5000 31bbda0ec0 make certain SEXP errors nonfatal
Some SEXP errors, although they indicate real problems, will not prevent the mission from running.  Add these as exceptions.  Implemented per requests from users of Blue Planet and Solaris.
2021-12-29 23:07:06 -05:00
Goober5000 e893d15000 improve SEXP error handling a bit
1) Sync formatting of each place SEXP errors are reported
2) Add error location (event or goal) if possible when mission is loaded

Note that the two FRED error dialogs already indicate the event or goal.
2021-12-20 13:57:17 -05:00
Goober5000 2f832d2883 fred ui partial updates for briefing editor and asteroid field editor 2021-12-11 14:11:10 -05:00
Goober5000 347c67b9c7 Merge pull request #3798 from TheForce172/feature/SubstituteShipLabel
Substitute Ship Label
2021-12-08 13:17:26 -05:00
Goober5000 869a5bf11c Merge pull request #3704 from Baezon/asteroid-arbitrary-targets
Allow for arbitrary asteroid targets in missions
2021-12-08 13:15:52 -05:00
The Force acc6fb4cfb #3757 Substitute Ship Label In Closeup View 2021-11-25 17:06:50 +00:00
Asteroth b0b40deae7 add a better random asteroid type picker and some fred/qtfred support 2021-11-24 23:01:16 -05:00
Asteroth 8f3b5dd2c0 address some review feedback 2021-11-24 02:42:30 -05:00
Asteroth f91a5bfd00 Add +arrival rvec for ship bays (#3698)
* add ship bay arrival rvec

* unused variables

* add profile flag

* add corresponding departure flag

* revert accidental changes

* fix fallout from visual studio's dumb 'rename' feature

* swap parsing of departure and arrival rvec
2021-10-15 16:48:56 -04:00
Joshua Glatt 16d75b981c karajorma's SEXP containers, Part 2: Persistence (#3462) 2021-10-11 18:58:00 -07:00