-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
BeforeChunkUnload sending now in multiplayer on invalidate. Fix Respawn in multiplayer #3792
Conversation
Some refactoring for RemoteChunkProvider
This pull request introduces 1 alert when merging ddb4813 into 70ac0dc - view on LGTM.com new alerts:
|
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
Tried to test this but I still get the old behavior. Ran a headless server + standalone client and flew far from spawn then fell from a high place and respawned in the usual void :-( Loads of spammy logs like the following:
Additionally if I had two players the first player leaving spawn would actually cause the chunks there to unload despite the other player standing there 😁 So there's something wrong with the chunk relevancy calculation still |
@Cervator |
If the chunks are there and just invisible that beats being unloaded - and I guess that can be an easy bit of confusion. Both result in a void but in one you can move. Maybe in that case it is a chunk readiness pass that's broken - the chunk loads but lighting calcs or something never finish and let it continue to the next stage of readiness. Also: be mindful of how you update a a topic branch - if at all possible please rebase on top of latest upstream, avoid merging into topic branches as that just creates messy history or possibly even problems merging into upstream later :-) |
Hooray Jenkins reported success with all tests good! |
980260d
to
9cf8fc7
Compare
Hooray Jenkins reported success with all tests good! |
1 similar comment
Hooray Jenkins reported success with all tests good! |
35bf0bc
to
07ec5e1
Compare
Hooray Jenkins reported success with all tests good! |
ClientEntity.locationComponent.location == PlayerCharacterEntity.locationComponent.location at respawn, now.
Uh oh, something went wrong with the build. Need to check on that |
Almost ! It works great in multiplayer! But now respawn isn't fully working in single player 😅 I can test in headless + two regular clients just fine. But if I start in single player, fly far away, drop from a high place, and respawn my player isn't quite right. I can't move the camera up or down, and if I try to take actions the game thinks I'm still in a different place:
I'm pretty sure this has happened before, it feels very familiar. We had a fun round of changes with this in the past when messing with the whole alive or not, respawning, etc. Probably not a hard fix. Nearly there! |
Using client entity for change location of ingame player - wrong. You must use character for this.
Hooray Jenkins reported success with all tests good! |
So! Good news with a hint of mystery :-) It works now in single player! 🎉 It seemingly also works in headed multiplayer (server/client hosting) 🎉 But while the chunk reloading seems to work after a death in headless multiplayer I was able to provoke a server crash - but seemingly only with very specific config, and only twice. Now I cannot replicate 😞 My testing setup here is JoshariasSurvival + HumanoidCharacters + Rails + CheatsForAll. It did not crash in the headless attempt with Rails and HC removed. But then I put those back, simplified the seed, tried again, and didn't crash. Restored the initial seed, still didn't crash 🤔 So the error reported below is not something I can replicate, but I'll leave it in anyway - will merge this now as seemingly working :-) One issue I did notice and am not sure if pre-existing but in one test I started the headless server, joined a player, flew away, died, and respawned. Everything was fine so I logged out. I then started a second different game client, and did the exact same thing. On that attempt after respawning I got logged errors about multiple loads of every chunk that then loaded. Anyway since that may be pre-existing and may just cause some wasted cycles I won't worry about it right now. For the former issue I now cannot replicate keep reading, but optionally just ignore at this point. It crashes with the following {
"defaultModSelection": {
"modules": [
"JoshariasSurvival",
"HumanoidCharacters",
"Rails",
"CheatsForAll"
],
"defaultGameplayModuleName": "JoshariasSurvival"
},
"worldGeneration": {
"worldTitle": "Dec2019",
"defaultSeed": "Vq1tAcQAe9cpt2FAHgkZk7Kr7BEBS2qjShattered Planes-00",
"defaultGenerator": "Core:facetedperlin"
}
} Server log:
Client (may be a solely a consequence of the server dying)
It did not crash after I update the seed value - something specific about that world? Seed came from a play test I was trying to run ShatteredPlanes with, but that wasn't working for another reason so I went back to plain faceted Perlin just with the same seed value. So But then even after reverting to the "bad" seed it then promptly did not crash ... |
Contains
Added missing event source: BeforeChunkUnload.Client's
Systems will be notified of unloaded chunks now.
Fixes #3006
Possible fix #2477
How to test