Fix elements staying streamed in after leaving an activated sector - #5364
Open
Flashmyname wants to merge 1 commit into
Open
Fix elements staying streamed in after leaving an activated sector#5364Flashmyname wants to merge 1 commit into
Flashmyname wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OnElementEnterSectoradds an element to the active list when it enters an activated sector, but nothing removes it when the element moves out of one into a sector that is not activated. It is queued for stream out and still left inm_ActiveElementsandm_ActiveElementSet, soRestreampulls it back in on the next pulse.It is now removed there, the same way
RemoveElementdoes it (CClientStreamer.cpp:332-333).Motivation
The element stays streamed in even though its sector is not active, and it stays in the list that
DoPulsewalks and sorts every frame for the rest of the session.Test plan
Objects use 300 unit sectors, a 3x3 activated block and a 500 unit stream distance, so the window only exists when the player stands near a sector edge. With the player at x=2095 the block ends at 2400: 60 objects created next to the player, then moved to x=2495, which is outside the block and 400 units away.
Checklist