Commit Graph
1147 Commits
Author SHA1 Message Date
JohnAFernandez c7ea110652 Remove whitespace change 2021-01-02 01:41:15 -05:00
JohnAFernandez 8a81b18200 Keep fred from adding extra texture replacements to mission file 2021-01-02 01:37:37 -05:00
JohnAFernandez de7d0c79d3 Merge pull request #2214 from notimaginative/multi_packet_fixes
Multi packet fixes
2020-12-24 12:16:29 -05:00
Taylor Richards 0e55c36877 update netgame_descript_packet()
(based on PR 2109 by Cyborg17)

 - support compaign descriptions (Mantis 1826)
 - allow sending multiple packets to get entire description
 - update description of selected game on join screen if needed
2020-12-24 09:38:23 -05:00
Taylor Richards 67d17e2c28 optimize size of ship_create_packet() 2020-12-24 09:38:23 -05:00
asarium 4af292af5a Add scripting API to access briefing color tags 2020-12-24 12:54:09 +01:00
Goober5000 8cf900b6ad additional null checks
Some subsystem code was being run for submodels when the subsystem didn't necessarily have a submodel attached.
2020-12-22 15:28:44 -05:00
Goober5000 88c1d8a02a consolidate model instance code 2020-12-18 01:32:43 -05:00
Goober5000 7c92dd9f7c hoist model_get and model_get_instance out of a bunch of functions 2020-12-16 11:55:31 -05:00
Goober5000 b90fc2b3ad numeric to boolean 2020-12-08 19:54:31 -05:00
Goober5000 7eb18dddca clean up the second half, and remove an unused field 2020-12-03 21:19:53 -05:00
Goober5000 b0ef7859c8 Merge pull request #2915 from JohnAFernandez/Warn-About-Invalid-Squadron-Wings
Warn about and correct invalid squadron wings in multi
2020-11-26 00:14:51 -05:00
JohnAFernandez dcfd3aa8a9 feedback 2020-11-25 22:07:21 -05:00
Phantom Hoover a4977f1a62 Only save hotkeys between missions if the player has added to them 2020-11-23 17:41:06 +00:00
JohnAFernandez 2c43b7b506 Allow mission loading to circumvent multi Squadron bug 2020-11-21 09:54:08 -05:00
Taylor Richards 22e13f88ba prevent loadout issues in multi due to iff changes 2020-11-17 04:20:16 -05:00
Goober5000 32583f7216 don't access invalid memory if the shipnum is -1
This resolves #2887, even though that issue is really a case of bad data.
2020-11-14 22:24:49 -05:00
Goober5000 a4d10a3fe4 properly handle directive with long words
A follow-up of sorts to #2801, but independent of it.  If a directive line is not split, the HUD should handle it properly rather than Asserting and displaying the same line twice.
2020-10-16 21:02:36 -04:00
Goober5000 465af93dcd fix display names for wings (#2787)
Fix wing name generation, when using hash symbols, to use the new display name method.
2020-10-08 22:48:30 -04:00
JohnAFernandez 186fe51344 Object update packet upgrade (#2752)
* Object Update Refactor

    1. Keeps the object update packet aligned, even if the ship is dying or has not yet arrived on the client.
    2. Properly handles model point shields (yes, that's what was causing multi to crash the most!)
    3. Reworks positional interpolation timing and adds rotational interpolation, by sending timing information with every object update packet in a header shared between objects.
    4. Saves a lot of bandwidth by only sending data that is changing. (no more sending all subsystems once per second!)
    5. Better handles out of order packets (but can still use their information if recent enough!)
    6. Builds the basis for Rollback by beginning to record the positions and orientations and velocities of ships for the last 30 frames.
    7. Adds subsystem rotation -- Yeah, you saw that right, subsystems will now spin in multi.
    8. Waypoint movement is now enabled via sexp, and time to arrival of waypoints is updated on the target info gauge.

* Fix edge case crash and Incorporate feedback

* Clean Up Interpolate Angles Quick

* Restrain the client

* How was this still here???

* Make sure every part of OO uses OOC_INDEX_NULLPTR_SUBSYSTEM define

* Fix Way to Store Return Values

* Ok travis, we get it

* Ok travis.........
2020-10-08 15:29:06 -04:00
Goober5000 23b3aadf9b Message size fix (#2784)
* Fix underline length calculation in message scrollback
* Use SCP_string for message source (which allows ships with long display names to work without crashing) and message text
* Upgrade assorted functions to work with SCP_string
2020-10-06 14:31:03 -04:00
Goober5000 09af27d194 fix display name
PR #2718 introduced the Has_display_name flag, but for mission parsing, the parse object flags were cleared subsequent to their assignment.  This moves the flag reset earlier in the function.
2020-09-11 21:03:37 -04:00
Goober5000 f6ca9cddfa support zero-length display names
Previously the code assumed that an empty display name was the same as no display name.  This adds a flag so that empty names are allowed.
2020-09-07 14:38:16 -04:00
Baezon 6e4ee916a0 aip->wingnum instead of shipp->wingnum 2020-09-05 01:38:53 -04:00
Baezon 62465a24f5 swap wingnum and index, moar MAX_SHIPS_PER_WING 2020-09-04 23:29:56 -04:00
Baezon c225cf7b90 autopilot argument 2020-09-04 23:09:59 -04:00
Baezon d3eacb1a0f v1 2020-09-04 21:35:40 -04:00
Goober5000 0e1dfa7ab0 Merge pull request #2692 from Baezon/species-wing-positions
Allow for arbitrary wingmate relative positions
2020-09-01 14:38:23 -04:00
Goober5000 381df6eeb8 formation should now work in fred. 2020-08-31 16:21:30 -04:00
Goober5000 bf949f1ff0 move formations from species_defs.tbl to ships.tbl 2020-08-31 15:44:02 -04:00
Baezon 518c60dd08 review fixes 2020-08-29 21:50:42 -04:00
Baezon 0aa0c80af8 more than one formation 2020-08-29 14:32:49 -04:00
Goober5000 3d734948da Merge branch 'master' into display_name 2020-08-29 13:47:21 -04:00
asarium 2303785717 Improve scripting hook variable system
The previous system was kind of hacky and made things a bit inflexible.
This improves that system quite a bit and also adds unit tests for the
hook variable functionality.
2020-08-29 10:27:41 +02:00
Baezon 338e049cb1 renaming of functions 2020-08-24 00:50:42 -04:00
Goober5000 3b2af702f7 refactor display_name for ships, ship classes, and weapon classes
Several things going on here:
1) refactor `get_display_string()` to `get_display_name()` to be more precise
2) likewise, refactor `alt_name` to `display_name`
3) automatically generate display names when parsing the ship, ship class, and weapon class for the first time
4) remove the on-the-fly truncation of names with hash symbols

Basically this subsumes the `end_string_at_first_hash_symbol` logic into the display name.  Rather than truncate the name every time it's displayed, truncate it once when it's parsed.  This takes advantage of the previous display name infrastructure, since display names are a superset of the case of truncating the hash symbol.

This also has the benefit of now allowing hash symbols within display names.  When updating Destiny of Peace, I noticed that "Lockheed Shuttle #4" would no longer display properly; and it was not previously possible to fix this even with display names.

I could pull out the `get_display_string()` and `alt_name` renaming into a separate PR if desired.
2020-08-21 00:15:38 -04:00
Goober5000 cf42e1db68 use SCP_string instead of fixed buffer
With very long mods, this error message can overflow the buffer.  So I changed it to a SCP_string.
2020-08-14 00:07:16 -04:00
Goober5000 2dec0af410 add code to tell if debris is one of those tiny models
make Debris dynamic, and use a soft limit at 64 pieces (the old MAX)
add per-class specification of death roll sounds
2020-08-12 23:51:39 -04:00
Goober5000 b12d0986c5 sometimes the FSO code is like Jenga
The #2528 fix broke ships destroyed before mission start because their arrival delay was *already* set up (as a bogus timestamp).  So this change adds a special exception for that.
2020-07-11 22:34:09 -04:00
Goober5000 5951d05587 Merge pull request #2559 from Goober5000/debriefing_persona_enhancements
Debriefing persona enhancements
2020-07-10 21:03:04 -04:00
Goober5000 a5b8c7b376 add debriefing persona sexp and make a few additional tweaks 2020-07-09 12:49:38 -04:00
Goober5000 26f4531300 fix skipmemymissionyo 2020-07-09 11:47:07 -04:00
Goober5000 0c53682ab8 fix Mantis 2871
There was an AI class validity check for the pilot, but not for turret weapons.  This fixes that.

Also, the p_object parameter to this functino was named `objp`, which is misleading because that's usually used for object.  I renamed it p_objp.
2020-07-06 21:39:10 -04:00
Goober5000 cb9803a20a Merge pull request #2540 from Goober5000/dock_leader_message
clarify these warnings based on feedback
2020-07-02 18:43:54 -04:00
Goober5000 4a21436b9a Merge pull request #2536 from Goober5000/change_background_sexp
allow switching between multiple backgrounds
2020-07-02 14:56:22 -04:00
Goober5000 d2625be6d8 clarify these warnings based on feedback 2020-07-02 14:25:23 -04:00
Goober5000 d440d29d21 fix ship registry in regards to wings with multiple waves
The ship registry previously stored the ship name as a pointer, but that pointer was reused when subsequent waves of a wing overwrote a p_object from the first wave.  So, the name is now copied into an array.

Additionally, subsequent waves of a wing are now "eagerly" stored in the ship registry so that the p_object reference can be stored as well.
2020-07-02 01:23:55 -04:00
Goober5000 7e947e522e allow switching between multiple backgrounds
For quite some time missions have had the ability to edit more than one background.  This was previously used for fallback loading in case the first background's bitmaps were not available, but I realized it would be very handy to allow switching between backgrounds for in-mission jumps.

The FRED background dialog can now add and remove backgrounds from the list.  Additionally, a new `change-background` sexp can instantly switch between backgrounds without messing around with bitmap references.
2020-07-01 23:32:12 -04:00
Goober5000 36d93db0a4 fix arrival delay handling
Volition's arrival code used eager evaluation of arrival cues even before the mission was finished parsing.  With the new sexp optimization code, this can fail because the sexps can depend on ships which are not even parsed yet and thus are not in the ship registry.  So I moved the arrival_delay initialization and added some comprehensive comments explaining what is going on.
2020-06-29 18:29:00 -04:00
Goober5000 5bc1d9da30 constify_ctext 2020-06-26 14:47:39 -04:00