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

Fix particle not re-randomizing every emission #103068

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

QbieShay
Copy link
Contributor

Fixes #102885

Supersedes #103008

And probably creates a million problems for me down the line 🥲

@QbieShay QbieShay added this to the 4.4 milestone Feb 20, 2025
@QbieShay QbieShay requested review from a team as code owners February 20, 2025 12:06
@@ -41,6 +41,9 @@
void GPUParticles2D::set_emitting(bool p_emitting) {
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.

if (p_emitting && p_emitting != emitting && !use_fixed_seed) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (p_emitting && p_emitting != emitting && !use_fixed_seed) {
if (p_emitting && !emitting && !use_fixed_seed) {

Looks like it could be simplified, right? The same is valid below.

@akien-mga akien-mga requested a review from clayjohn February 20, 2025 13:17
@akien-mga akien-mga added the bug label Feb 20, 2025
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We want to get this into RC1 which we are building momentarily, so let's merge as is

Comment on lines +62 to +63
if (time == 0) {
_update_internal();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is carried over from CPUParticles3D. It seems correct to me, so let's keep it

@akien-mga akien-mga merged commit 8ec34e9 into godotengine:master Feb 20, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks @QbieShay ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Status: Done
Development

Successfully merging this pull request may close these issues.

(4.4.beta3) GPUParticles3D spawn angle does not work when particle one_shot is true.
4 participants