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

Isaac.Spawn() API crashes when seed is 0, need a better implementation #611

Open
Tvangeste opened this issue Jan 2, 2025 · 0 comments
Open

Comments

@Tvangeste
Copy link

Tvangeste commented Jan 2, 2025

See https://wofsauge.github.io/IsaacDocs/rep/Isaac.html#spawn

There are two spawn functions. Isaac.Spawn() (this one), which spawns an entity with a random seed, and Game():Spawn(), which spawns an entity with a specific seed. However due to a bug, Isaac.Spawn() has a chance to generate a seed of 0, which crashes the game. If you need to spawn an entity with a random seed, you should always use Game():Spawn() with a helper function that calls Random() and arbitrarily sets the seed to 1 when the seed is 0.

Would be nice if Repentogon fixed this issue, otherwise the game randomly crashes from time to time when the vanilla Isaac.Spawn() is used.

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

No branches or pull requests

1 participant