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 clientsim spawn bug #82

Merged
merged 1 commit into from May 16, 2023
Merged

Conversation

cubedparadox
Copy link
Contributor

I added a function to reset spawn order when initializing clientsim, which prevents preinitialization related spawning errors.
This is needed because we call into the same spawn function when initially loading in the localplayer, so sequential spawning offsets get messed up. (We load in the player at onBeforeSceneLoad, then clientsim respawns them at Start after everything is instantiated into the scene, so the sequential spawn counter gets ticked twice at startup)
There could be a better solution where we only call the spawn function once, but that's digging into levels of initialization-order-type spaghetti that I don't think make sense to tackle here.

…ation related spawning errors

this is needed because we call into the same spawn function when initially loading in the localplayer, so sequential spawning offsets get messed up
@momo-the-monster momo-the-monster linked an issue May 3, 2023 that may be closed by this pull request
Copy link
Collaborator

@momo-the-monster momo-the-monster 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, and fixes the issue in a small test.

@cubedparadox cubedparadox changed the base branch from releases/1.2.3 to releases/1.2.4 May 16, 2023 19:33
@cubedparadox cubedparadox merged commit e5a962f into releases/1.2.4 May 16, 2023
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClientSim Spawn bug
2 participants