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 seed not randomizing for particles. Fix seed being stored when fixed seed is off #102405

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

QbieShay
Copy link
Contributor

@QbieShay QbieShay commented Feb 4, 2025

Fixes #102182

@QbieShay QbieShay requested review from a team as code owners February 4, 2025 11:04
@QbieShay QbieShay added this to the 4.4 milestone Feb 4, 2025
@KoBeWi
Copy link
Member

KoBeWi commented Feb 4, 2025

When you enable fixed seed, you will be greeted with the randomly generated one:

godot.windows.editor.dev.x86_64_zZ98gLMSdt.mp4

If it's not intended then you could reset the seed when use_fixed_seed is being enabled.

@@ -597,7 +597,7 @@ void CPUParticles2D::_validate_property(PropertyInfo &p_property) const {
}

if (p_property.name == "seed" && !use_fixed_seed) {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated now, but it's better like this.

Suggested change
if (p_property.name == "seed" && !use_fixed_seed) {
if (!use_fixed_seed && p_property.name == "seed") {

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

Fixes the problem for GPUParticles2D, and seed isn't stored in the file, and already stored seeds are respected

Didn't test other nodes

@AThousandShips
Copy link
Member

If it's not intended then you could reset the seed when use_fixed_seed is being enabled.

This would reset a manually assigned one when toggling it off and on, so think having a random seed when enabling it from scratch is worth not erasing it each time

@QbieShay
Copy link
Contributor Author

QbieShay commented Feb 4, 2025

When you enable fixed seed, you will be greeted with the randomly generated one:

This is by design! That way if you see a combination you like when testing, you can freeze the random seed.

@akien-mga akien-mga merged commit 954ce86 into godotengine:master Feb 5, 2025
19 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

GPUParticles2D not random
4 participants