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

Spawn preparing re-lights all spawn chunks needlessly #1615

Closed
madmaxoft opened this issue Nov 24, 2014 · 2 comments · Fixed by #1657
Closed

Spawn preparing re-lights all spawn chunks needlessly #1615

madmaxoft opened this issue Nov 24, 2014 · 2 comments · Fixed by #1657
Assignees

Comments

@madmaxoft
Copy link
Member

With the new change in the spawn preparation, it has become faster for the initial world generation, but it's slower for starting an already-generated server, since the chunks are being re-lit needlessly. We need to skip the lighting altogether if the chunk can be loaded with lightmap successfully.

@madmaxoft
Copy link
Member Author

Also, the preparation deadlocks if PregenerateDistance is set to 1

@madmaxoft madmaxoft self-assigned this Dec 8, 2014
@madmaxoft
Copy link
Member Author

I'm doing this.
First I want to introduce a new function, cWorld::PrepareChunk(), that completely prepares the specified chunk (loads / generates / lights) and then calls the specified callback.
For this to work I need to change the world storage and generator to support callbacks, so I'm adding those first.

Then, the spawn preparation will just use this function together with the callback to continue preparing.

Finally, I'll make that function available to Lua so that ChunkWorx can use it as well.

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 a pull request may close this issue.

1 participant