💨 Made particles freeze when actor physics are paused (hidden mode '2') - #3416
Open
ohlidalp wants to merge 1 commit into
Open
💨 Made particles freeze when actor physics are paused (hidden mode '2')#3416ohlidalp wants to merge 1 commit into
ohlidalp wants to merge 1 commit into
Conversation
I've added a hidden option `gfx_particles_mode = 2` which gives every actor it's own particle pools. This option isn't shown in the Settings UI yet since it's experimental. It might negatively impact FPS and terrain loading times (for example Auriga because of the traffic cones). The best way to use it is to open ingame console and type `set gfx_particles_mode 2`. Any actor (re)spawned afterwards will have it's own particle pool that pause when it's paused. Note that custom particles and legacy systems (like x/y exhausts or turbojets) will pause regardless because these were always per-actor. Codechanges: * Application.h: added `enum GfxParticlesMode` * DustPool.h/cpp: added function `AdjustDustPoolSpeedFactor()` because doing it inside `update()` isn't reliable. * GfxActor.cpp: Added creating/updating/deleting the per-actor particle pools. * GfxScene.h/cpp: Extended helper `AdjustParticleSystemTimeFactor()` to respect paused actors. * the rest is minor adjustments to fit the new feature Fixes RigsOfRods#3412
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added a hidden option
gfx_particles_mode = 2which gives every actor it's own particle pools that freeze when the actor physics are paused.This option isn't shown in the Settings UI yet since it's experimental. It might negatively impact FPS and terrain loading times (for example Auriga because of the traffic cones).
The best way to use it is to open ingame console and type
set gfx_particles_mode 2. Any actor (re)spawned afterwards will have it's own particle pools that pause when it's paused. To just view the current value, typevars gfx_particles.Note that custom particles and legacy systems (like x/y exhausts or turbojets) will pause regardless because these were always per-actor.
Codechanges:
enum GfxParticlesModeAdjustDustPoolSpeedFactor()because doing it insideupdate()isn't reliable.AdjustParticleSystemTimeFactor()to respect paused actors.Fixes #3412