35 Commits
Author SHA1 Message Date
wookieejedi 2e57072b57 Skip particle parsing to speed up FRED loading (#7602)
FRED takes a long time opening mods that have a lot of particle entries in the particles table such as FotG (can take over a minute or more sometimes), so given FRED never renders or pages in particles, just skip the parsing.
2026-07-13 11:57:01 +09:00
BMagnu dc50aaa86b Particle Scripting API (#7061)
* Expose particle effects to scripting

* Allow creation of particle sources

* Add API for particle sources

* bugfixes
2025-09-28 10:40:46 +02:00
BMagnu 5903dc7e9d Filter out invalid particles (#7055) 2025-09-23 04:06:09 +02:00
BMagnu 1e7431a044 Give Particles Access to Their Spawner Effect (#7034)
* Make particles aware of the effect that spawned them

* Allow modular curves to call global functions from submember inputs

* Add more in and outputs for particle lifetime curves

* Allow post-curve velocity as a curve input

* fix warning and incorrect assig

* Disable CheckTriviallyCopyableMove

* Clang Tidy
2025-09-15 04:42:06 +02:00
Birk Magnussen ec0e55d077 De-movify random ranges 2024-12-16 14:22:29 +01:00
Birk Magnussen e2dbb46b9c Fold OmniEffect into ParticleEffect 2024-11-03 14:45:16 +01:00
Birk Magnussen 1aa67c9342 Properly use new effect host 2024-11-02 14:48:58 +01:00
Birk Magnussen 98ddb1500f Add sensible particle host class 2024-11-01 16:23:11 +01:00
BMagnu bd1792d777 Move Effect timing into the ParticleSource. 2024-10-24 16:54:02 +02:00
Birk Magnussen 09d8ffe66d Do legacy parsin 2024-09-24 17:24:31 +02:00
Birk Magnussen db4ec11fd9 Remove redundant effects 2024-09-24 17:24:27 +02:00
BMagnu 8503c8a068 Start replacing legacy effects with omnieffect 2024-09-24 17:23:01 +02:00
Birk Magnussen e0c2ba7011 Prepare for the removal of composite effects 2024-09-24 17:23:01 +02:00
Birk Magnussen 5dfc2108dc Fix bugs from particle_emitter refactor 2024-09-24 17:23:00 +02:00
Goober5000 cc790a00bd Merge pull request #6223 from Goober5000/address_6010
address 6010
2024-07-11 21:17:40 -04:00
Goober5000 e90416e199 Several coverity fixes (#6232)
* coverity - using `std::move` instead of copying, and change some parameters from value to reference

* coverity - fix or mark potential copy-paste mistakes

* coverity - various checking of parameter and return values

* coverity - miscellaneous fixes, and change some 'intentional' markers to 'false positive' markers
2024-07-06 12:51:31 +02:00
Goober5000 c03207f141 address 6010
I took a close look at the code involved in parsing particle tables.  There is no smoking gun, but there are several ways to polish the code which I have implemented here.  The most likely culprits for the slowdown, IMO, are the repeated conversions between SCP_string and C-string, especially in `ParticleManager::getEffectByName()`; followed by the omission of `std::move` in several places.
2024-07-03 15:06:33 -04:00
Taylor Richards d0964d7380 use proper return for invalid particle effect 2022-01-18 10:04:02 -05:00
Taylor Richards 5e2a4c05a3 make sure particles don't get processed on standalone 2022-01-18 06:38:35 -05:00
Asteroth 1445e778f0 Add volume effects (#3446) 2021-06-01 22:20:42 -04:00
asarium 92e5f2f35d Apply particle source hack to correct vector
In the particle effect code there is a small hack required for getting
some constant pointers in a vector. However, there is another mechanism
where sources are not added to the sources vector if the sources are
currently being iterated through. That is necessary to avoid
accidentally invalidating the iterators.

The issue here was that the vector resizing hack was not applied to the
correct vector when we were currently iterating. This fixes that.

This fixes #2928.
2020-12-28 17:58:20 +01:00
wookieejedi 482b691f76 more appeasement 2020-10-27 14:49:27 -04:00
wookieejedi 04dc2aef57 appease travis 2020-10-27 08:07:08 -04:00
wookieejedi d762578fe0 incorporate feedback 2020-10-26 22:38:15 -04:00
wookieejedi 032430d126 specify size_t type 2020-10-26 16:31:51 -04:00
wookieejedi 879e7119d5 clean up redundancies 2020-10-26 15:54:40 -04:00
wookieejedi 8bc1c4c797 use pushback function 2020-10-26 14:08:14 -04:00
wookieejedi 01cc444836 Add 'Choose Random Bitmap' for Particle Effects 2020-10-26 13:47:26 -04:00
asarium c6e2f94d0b Use type-safe handles for particle effects
Nightmare discovered an off-by-one error when checking the validity of a
particle effect handle. Since the new ID system makes that much easier
and less error-prone I decided to go ahead and convert all handles to
an ID typedef which also fixes the reported bug.
2018-07-15 14:50:32 +02:00
asarium 07107ce9b2 Fix newly introduced format warnings 2017-03-15 19:34:11 +01:00
asarium 52aa0ac031 Add catch clauses everywhere where parselo is used
Before, if any parsing call failed it would throw an exception which
would have been propagated to the exception handler in main() which
terminates the program. This should fix that.
2016-12-09 10:46:51 +01:00
asarium d64196eff0 Refactor tracing subsystem
The new design is centered around the Event Trace JSON format but it
should still be possible to adapt it for other profiling tools. The old
profiling system has been removed.
2016-11-24 10:26:21 +01:00
asarium 7be17c9656 Fix a few Coverity issues in the Particle effects code 2016-10-07 11:09:45 +02:00
asarium c112f093a8 Add ship explosion particle effects 2016-09-02 11:05:03 +02:00
asarium bbeaaa1565 Add a new particle effect system
This is similar to the script I wrote a few years ago but unlike that
one, this solution doesn't kill the performance.
2016-08-04 11:08:39 +02:00