Commit Graph
31 Commits
Author SHA1 Message Date
BMagnu b3c3627f54 Allow using seeded noise for particle velocity and spawn position offset (#6675)
* Add noise backend for particles

# Conflicts:
#	code/particle/ParticleEffect.cpp

* noise frontend

* Proper scaling for noise

* make normalize safe
2025-05-26 20:43:56 +09:00
BMagnu 23dc22e172 Unify Particle Attachment (#6571)
* Fix incorrect ship legacy particle curve assignment

* Setup trigger radius

* Properly attach particle sources to objects and subobjects

* Add trigger velocity for weapon impacts

* Onetime particle source timing fix

* Warnings

* Allow global_to_local to work with no submodel

* Allow global_to_local to work with no submodel, again
2025-02-03 22:14:19 +01:00
Birk Magnussen 1f2a8dce2a remove optional 2025-02-01 13:17:26 +01:00
Birk Magnussen 40312e7419 Add modular curve sets to volumes 2024-12-12 16:44:34 +01:00
BMagnu c2051578d6 Basic modular curves for particles 2024-12-11 13:55:36 +01:00
Birk Magnussen 3d171eb858 Remove EffectTiming 2024-11-03 15:00:32 +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
Birk Magnussen bb3e50832d Fix particle end conditions and vector-based orientations for offset 2024-10-27 21:13:51 +01:00
Birk Magnussen c0f5b0ba86 Properly deal with always-particle sources 2024-10-27 20:55:52 +01:00
BMagnu bd1792d777 Move Effect timing into the ParticleSource. 2024-10-24 16:54:02 +02:00
Birk Magnussen b9b7a13586 Fix source bugs 2024-09-24 17:42:19 +02:00
Birk Magnussen e0c2ba7011 Prepare for the removal of composite effects 2024-09-24 17:23:01 +02:00
Kestrellius 6da7830b7b Add offset for tabled particle effects (#6264)
* Adds particle effect offset.

* bugfixing

* Switches to a cleaner approach.

* Futureproofing for particle parenting.

* actually let's just bundle parenting into this one

* working on turrets

* grinding toward turret correctness

* still grinding toward correctness

* Gets turrets working correctly.

* Fixes merge artifact

* appeases clang-tidy

* Updates some comments.

* Updates some comments.

* Tiny bit of cleanup.

* Deduplicates comments.
2024-08-13 23:06:44 +02:00
Kestrellius cb75da4de6 Interpolate particle spawning positions for moving spawner objects (#6249)
* Sets up linear interpolation for object particles.

* Makes interpolation time-based.

* Updates comments to match changes.

* appeases clang-tidy

* Adds interpolation for particle particles.
2024-07-29 22:35:44 +02:00
Goober5000 d5e387479e replace pointers with indexes in object_h
This refactors the object_h struct to store objects as indexes rather than pointers.  This is a prerequisite for making the collection of objects dynamic in the future.  See also #6100.

Follow-up to #5800 and #5829.
2024-06-09 02:06:22 -04:00
Kestrellius 3f5a154e7a Updates beam-source particle velocity each frame. 2024-05-17 19:58:57 -07:00
Kestrellius 9192bb00b1 Alters other files to match previous changes. 2024-05-13 13:23:41 -07:00
Goober5000 ec241fcab3 standardize on isValid() and make validity member functions const 2024-02-26 15:56:41 -05:00
Asteroth b23dff91e7 revert removal of allow relative (#5807) 2023-11-16 22:20:54 -05:00
Asteroth 71ac62e395 add parent size and parent lifetime 2023-05-24 23:54:38 -04:00
Asteroth 63df812d79 Add beam particles (#5330)
* add beam particles

* tweaks

* more tweaks

* fix warning

* dumb c++

* fix switch

* spelling
2023-04-29 08:45:31 -04:00
Goober5000 e2f63a2340 rename and document several model coordinate functions 2022-02-15 20:59:24 -05:00
Asteroth 0f06bf279a Add velocity inheritance for particle effects (#3691)
* implement velocity inheritance for particles

* add vel inherit for single effects

* appease clang

* review feedback
2021-10-10 13:37:31 -04:00
asarium 8f88801646 Add dynamic action programming system
This system adds the code necessary for letting content creators specify
complex events by specifying a simple, program-like sequence of
operations that will be executed by the engine when a certain event is
triggered.
2021-02-21 21:29:02 +01:00
Goober5000 7c92dd9f7c hoist model_get and model_get_instance out of a bunch of functions 2020-12-16 11:55:31 -05:00
asarium 422753976f Add support for "Effects per second" feature
This allows specifying how many times per second an effect should be
triggered for a particle source instead of triggering the effect every
frame. This will allow modders to achieve more consistent particle
effects regardless of FPS.
2019-01-19 13:56:45 +01:00
asarium eeed22b91a Enable misc-unused-parameters
clang-tidy was used for fixing the warnings. It is not clear if this is
actually an improvement so this may still be disabled later.
2018-04-25 11:57:55 +02:00
asarium 68372b18a2 Enable performance clang-tidy warnings 2018-04-13 12:08:56 +02:00
asarium a7b1c00a84 Fix handling of relative source directions
Previously, the source orientation was always aligned to the world so it
couldn't adapt to a weapon that changes direction. This fixes that by
introducing a "relative" mode for source orientations that is enabled by
default and disabled if the direction is set explicitly.
2017-10-04 15:59:09 +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