-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
FloorHandler.RpcRequestChangeFloor always changes the floor of the local player #122
Comments
This is indeed a bug with the code, however since the request change floor RPC is sent on the player physics, trying to teleport other players would result in an anticheat disconnect on official servers. I could move it to a shipstatus RPC to keep compatibility with officials if needed. Since I'm on vacation now I won't be able to update the mod, but In the meantime, you can get the host to run |
I tried to fix the problem in the way you suggested, but I had a new problem where it would move to an unexpected place (inside a wall, etc.) for a split second. Is it possible to add a patch to |
You're not really meant to send RpcRequestChangeFloor for other clients. Instead what you should do is make a custom RPC to update the floor state from the host. |
OK, I understand. |
Have you found a workaround for this? Do you still want me to make any changes to Submerged? |
I wish the layer saved in |
You mean RpcSnapTo? |
I'd be happy to have both, because my mod calls |
If you want to avoid the jitter on client side you can also call |
Is that to be used in combination with |
No, it's used in combination with RpcRequestChangeFloor. This is how the button for going up and down floors as a ghost works, it sends an RpcRequestChangeFloor but it doesn't wait for an answer, instead it does a RegisterFloorOverride to make the transition instant. That means you can run RpcSnapTo, RpcRequestChangeFloor and RegisterFloorOverride together to make the transition seamless for the local player. The fact that you use SnapTo on multiple clients might make that work differently though. Other clients might receive the SnapTo before or after the floor system update, so it will look weird for them. This is an extremely intricate problem, I'm not sure how the other role mods were able to work around it. |
Is this how I should handle Player A moving Player B up the layers?
|
Apart from that what you said does work yes, but it comes with the problem that it will still look jittery for other players (not for the local player though) |
Submerged wasn't really built with teleporting in mind. Best I can do is add an RPC that the host responds to, to teleport a player and change their floor at the same time. This does mean however that it will be delayed for other players, as it needs to be host-authoritative |
Thank you, I have confirmed that with local player there is no jittering |
Describe the bug
FloorHandler.RpcRequestChangeFloor always changes the floor of local player
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Player B's floor will be changed.
Screenshots
If applicable, add screenshots to help explain your problem.
Version (please complete the following information):
Log file
None
Additional context
Some mods require forcing a player to teleport, so another player should be able to change another player's floor.
The text was updated successfully, but these errors were encountered: