fix: issue with loadedEntityList on custom server #132
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.
Hey, I've noticed a bug with UMC on my custom server, when a player disconnects and reconnects to the server, they can't interact with IR trains and tracks. I reported this here a long time ago: TeamOpenIndustry/ImmersiveRailroading#1388
It then throws the error ‘Invalid packet missing player’ every time. The logs are attached.
Now I have investigated the problem further and found that when the player disconnects from the game, he is not removed from the loadedEntityList of the world. Adding this code fixes the problem and does not affect any other server applications.