Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to the FSO electrical arc system #6347

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Goober5000
Copy link
Contributor

Several enhancements to make the electrical arcs more useful and flexible.

  1. Data structures have been refactored to group all of the arc-related fields together
  2. next_fireball and fire_timeout in the debris structure misleadingly implied fireballs rather than arcs; these have been renamed to match the usage in ships
  3. Arc sounds were fixed to properly fire when arcs are created, rather than for every damage/EMP arc currently active on the ship
  4. Electrical arcs were made dynamic to allow any number of arcs on debris and ships. Currently the retail limits are still in place, but this could be customized in a future PR
  5. Electrical arcs can now be customized by specifying the number of segment divisions and whether the points are persistent (rather than regenerated every frame)
  6. A new scripting API method has been added to explicitly specify the points used for an arc

As part of 6), a new valueToVec3d utility method has been added that could be useful for future API functions.

@Goober5000 Goober5000 added enhancement A new feature or upgrade of an existing feature to add additional functionality. scripting A feature or issue related to LUA scripting Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle Requested by Active Mod A feature request that has been requested by a mod that is actively in development. labels Sep 10, 2024
@Goober5000 Goober5000 force-pushed the electrical_arc_enhancements branch 3 times, most recently from 947eb17 to 7c45fb3 Compare September 10, 2024 21:50
The code for generating spark sounds was incorrectly copied from debris to ships, dating all the way back to retail.  The sound should be played once per generation event, not once for every electrical arc active on the ship.  This fixes a bug that caused overlapping electrical arc sounds.
…nction with a handy valueToVec3d utility function
@Goober5000 Goober5000 removed the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality. Requested by Active Mod A feature request that has been requested by a mod that is actively in development. scripting A feature or issue related to LUA scripting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant