Commit Graph
1280 Commits
Author SHA1 Message Date
Goober5000 8ef92c944d move gun_submodel_rotation from model to instance
Since instance-specific fields have been moved to polymodel_instance and submodel_instance, the gun_submodel_rotation field should also be moved.  This is also reworked a bit to keeping track of the rotation via the normal submodel instance angles.

This removes an unnecessary look_at field as well.
2020-12-23 00:45:31 -05:00
Goober5000 b7b0d3a257 Merge pull request #3000 from Goober5000/model_instance_followup
another model to model_instance refactor
2020-12-22 21:31:14 -05:00
JohnAFernandez 508b420f07 Set correct time stamp for already-locked indicators. (#3002) 2020-12-21 09:07:05 -05:00
Goober5000 c18b1b63fd another model to model_instance refactor
Remove arc information from bsp_info and move it to submodel_instance.  Add a model instance to each debris chunk to keep track of it.
2020-12-20 14:51:05 -05:00
Goober5000 efe2d8476a 1) it's no longer necessary to call model_clear_instance before collision detection
2) call appropriate functions in collision detection because models might have instances
2020-12-18 13:46:49 -05:00
Goober5000 88c1d8a02a consolidate model instance code 2020-12-18 01:32:43 -05:00
Baezon 602dd45c10 fix los for multilock 2020-12-13 00:03:43 -05:00
JohnAFernandez f9e0ff5db6 Make sure lock indicators are done even if hud is disabled (#2970)
Someone already did the work.  Just making sure this function always runs even if the hud is diabled. (it just makes sense to)
2020-12-08 20:29:16 -05:00
Birk Magnussen 76c28ddccc Fixed HUD set Color call to use in game HUD instead of configs 2020-12-02 02:52:42 +09:00
Goober5000 d31003afea Merge pull request #2909 from PhantomHoover/feature/tune-transfer
Add ships.tbl flags to tune most aspects of ETS behaviour
2020-11-23 13:14:34 -05:00
Phantom Hoover 0151f1b5a8 Add ships.tbl flags to tune most aspects of ETS behaviour. 2020-11-21 23:07:21 +00:00
Baezon 96bd94dfa5 lock restriction enhancements 2020-11-20 12:04:03 -05:00
Asteroth 5dbda7efd0 Merge pull request #2858 from Baezon/multi-beam-prep
Add beam parameter validation
2020-11-08 22:43:58 -05:00
Baezon 9034e4e043 revert and only do beam validation 2020-11-04 13:31:09 -05:00
JohnAFernandez eb7a956a1e Allow polish_position() to use any player's position in multi 2020-10-31 16:46:50 -04:00
Goober5000 9eaa7bf024 redo the locking animations for multilock
The multilock patch did not handle `Lock_anim` in the best way, and handled `Lock_gauge` in a very bizarre way, despite the fact that they are two simple hud animations.  This changes the `lock_info` struct to track the correct `time_elapsed` value for both, and changes the locking code to use the values in the correct way.

Additionally, this properly loops the lock triangles on the FS1 lock indicator.  Strangely, even prior to the multilock merge it appears that the triangles wouldn't have animated more than a quarter turn.

Finally, this prevents the FS1 lock indicator from blinking, since in retail FS1 it didn't blink.

Tested with FSPort and no-mods.  Fixes #2826.
2020-10-27 02:55:36 -04:00
Phantom Hoover 9a5186f637 Avoid resetting player_has_lock unless they've actually lost their lock 2020-10-24 20:26:55 +01:00
Goober5000 6d8ab32971 Merge pull request #2822 from Baezon/bracket-deathroll-bug
Fix a bug with hud brackets during target deathroll
2020-10-22 11:22:09 -04:00
Baezon 7b6488aba2 array safety 2020-10-21 23:23:23 -04:00
Baezon 6808101e4a much cleaner this way 2020-10-21 23:10:35 -04:00
Baezon eae514a269 v1 2020-10-21 22:57:08 -04:00
Baezon ef65914129 v1 2020-10-19 13:40:25 -04:00
wookieejedi 950f248b03 Fix to Non Shielded Ships Manage ETS
This one line fix properly specifies which ship to use for ETS managment. The recent merge of `Non-shielded ships manage ETS` had a object reference error, so this rectifies that. Thanks to Axem for finding this!
2020-10-11 11:23:14 -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
wookieejedi 8961b3cc8e Merge pull request #2783 from wookieejedi/allow-non-shielded-to-manage-ETS
Flag to allow ships with no shields to manage ETS
2020-10-06 16:18: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
wookieejedi 443b3cd217 fix copy paste error 2020-10-06 14:07:19 -04:00
wookieejedi dabe025967 feedback and cleanup 2020-10-05 21:43:46 -04:00
wookieejedi 886e7f4f18 Flag to allow ships with no shields to manage ETS
Using the `No_shields` flag for ships is common usage in multiple mods, and as it turns out ships with that flag set will not have the AI manage ETS values due to an early return in the `ai_manage_ets` function. This PR adds an AI flag to allow ships with no shields to manage ETS regarding weapons and engines. This flag was tested and works as expected.
2020-10-05 19:57:09 -04:00
Baezon 06dd153f80 v1 2020-10-02 16:11:40 -04:00
Baezon cb0f3461aa v1 2020-09-08 21:42:42 -04:00
Baezon 4df4987b81 v2 2020-09-04 17:36:53 -04:00
Goober5000 67ea05fefd add some vector scripting functions
createRandomVector
perturb (for vectors)
perturb (for matrixes)
randomInCircle
randomInSphere
2020-08-30 09:36:24 -04:00
Goober5000 3d734948da Merge branch 'master' into display_name 2020-08-29 13:47:21 -04:00
Goober5000 71ce8229d5 Merge pull request #2682 from Goober5000/fix_name_alignment
fix alignments in the hud gauge parsing
2020-08-28 09:37:29 -04:00
Tyler Blount a8148940be Properly fix #2685 2020-08-27 11:08:31 -06:00
Tyler Blount c2e9c99ab5 Set ai_info lock variable if the player has any lock slots firing 2020-08-27 00:22:37 -06:00
Goober5000 1deaa36e07 fix alignments in the hud gauge parsing
Admiral Nelson led me to discover that the HUD gauges expected "right" or no string at all for the gauge alignment.  I added basic recognition of LEFT and RIGHT alignment.  Someone more familiar with the HUD than me can flesh it out more.
2020-08-25 14:52:56 -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
MageKing17 148392023f Merge pull request #2670 from MageKing17/cleanup/hudartillery-parse-error-reporting
Improve error reporting related to SSM strikes.
2020-08-19 21:21:28 -07:00
Tyler Blount 70bf31fbf6 Fix missile track loop playing infinitely 2020-08-19 20:20:26 -06:00
MageKing17 54f276c6be Improve error reporting related to SSM strikes.
First, in hudartillery.cpp, change some errors to warnings (actually error_display(1, ...) to error_display(0, ...), but same difference).

Second, change a Warning to an error_display(0, ...), and make it actually name the SSM strike instead of just reporting the name of the weapon it's using.

Third, do the weapon_info_lookup() earlier so we can use error_display() to point to the right line, and tell the modder that an invalid weapon invalidates the entire SSM strike (instead of just silently discarding the whole thing at the end).

Finally, in weapons.cpp, change validate_SSM_entries() to mention if Ssm_info is empty (instead of, say, telling the modder that the index needs to be between 0 and 4294967295—or, rather, -1 expressed as an unsigned 32-bit integer, since Ssm_info.size() - 1 is, indeed, -1 when the vector is empty).
2020-08-19 17:08:02 -07:00
wookieejedi 5c1d49b561 Merge pull request #2622 from Baezon/second-order-lead
Allow for second-order lead indicator prediction
2020-08-17 12:49:44 -04:00
Goober5000 8cde06370a Merge pull request #2634 from Baezon/species-class-multilock
Allow multilock missiles to restrict lock based on class or species
2020-08-14 00:46:55 -04:00
Baezon 48313c826f v2 2020-08-08 21:16:43 -04:00
Goober5000 06c6434d44 debris ambient sounds, optional ship sounds, begin collision sounds 2020-08-08 13:49:06 -04:00
Baezon 6927b5cef1 objectify 2020-08-07 23:28:43 -04:00
Baezon ededcd8156 v1 2020-08-07 03:20:26 -04:00
Baezon 860423b577 wip 2020-08-06 20:48:16 -04:00
Baezon c9784bc538 version 1 2020-08-03 23:57:45 -04:00