Closed uWynell closed 3 years ago
Hey, thank you for your contribution. However, it seems that your solution would result in a heavy performance drop (when there are more than the standard, 16, cells involved). I will keep this open in case you update your pull request.
Thanks @uWynell! I think I found a faster way to accomplish the same thing. You can see it 5716c506ddc5bf03df9ffda657f004f51f166d81 in this commit. Please tell me if you think it's acceptable.
For an English explanation:
When we check cells that are no longer in the viewbox but still are on the client, we check whether that player is the owner of the cell, and if so, we put it in the updNodes
array instead of the eatNodes
or delNodes
arrays.
And we also need to add that cell to the viewNodes
array because that array becomes the clientNodes
array at the end of the function.
If we didn't add it to the viewNodes
array, then next tick the server would forget that the client still knows about that cell.
closing in favor of 5716c50
The possible fix for #1550