refactor(particlesys): Cleanup retail smudge particle type identification - #3162
Conversation
PR Summary by QodoFix smudge particle type detection by setting type in ParticleSystem ctor
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Unsafe SMUD prefix read
|
14032b1 to
29621f3
Compare
|
Refactored now, this shouldn't be too much slower than the original retail hack, but it should be significantly safer. |
24df39e to
01d934c
Compare
|
Fixed another instance where the smudge hack was being used in particle system manager |
01d934c to
f133dc4
Compare
f133dc4 to
9917403
Compare
|
Updated based on feedback, should be good now. |
| m_particleType = sysTemplate->m_particleType; | ||
| m_particleTypeName = sysTemplate->m_particleTypeName; | ||
|
|
||
| // TheSuperHackers @info Hack to allow isUsingSmudge() functionality with retail smudge particles |
There was a problem hiding this comment.
This would be good to put behind PRESERVE_RETAIL_PARTICLES after #2709. Or an adjacent define.
There was a problem hiding this comment.
Is that going to get merged soon? If not can i grab the define section from it and add it to this PR.
Looking to get this merged so i can rebase the particle optimisation PR off it as it helps clean up some of the code there.
There was a problem hiding this comment.
Yes you can grab the PRESERVE_RETAIL_PARTICLES for this change.
There was a problem hiding this comment.
Done, this can be squash merged, the seperate PR's are just to make it easier to review.
d488219 to
971e4ce
Compare
|
Updated and ready |
971e4ce to
81a3187
Compare
Squash Merge
This PR is a simple refactor to cleanup the identification of smudge type particles.
The particle system manager originally had a hack to look for smudges based on the particles name.
Particles already contained code that allowed their type to be set as smudge and to query if they were smudge particles using the
isUsingSmudge()helper function.With this refactor, the retail "hack" check occurs within the particles constructor, allowing the particle type to be set to the smudge type.
This then allows external code to use the
isUsingSmudge()helper function as originally intended.