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

Seed rand only once #1422

Merged
merged 1 commit into from
Mar 7, 2021
Merged

Seed rand only once #1422

merged 1 commit into from
Mar 7, 2021

Conversation

Deathreus
Copy link
Contributor

Light testing applied

@Deathreus
Copy link
Contributor Author

See this for why it is needed

Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

Quite surprised this wasn't discovered earlier - thanks for the patch!

@Headline Headline merged commit f9633a5 into alliedmodders:master Mar 7, 2021
@peace-maker
Copy link
Member

I'm not sure that srand call in core is affecting rand calls in logic? Might work that way though.

@asherkin
Copy link
Member

asherkin commented Mar 7, 2021

I'm not sure that srand call in core is affecting rand calls in logic? Might work that way though.

The random seed is thread-local state, so it's shared across all modules in a process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants