Skip to content
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

Project Converter: Wrong @rpc annotations #62832

Closed
nathanfranke opened this issue Jul 8, 2022 · 3 comments · Fixed by #63887
Closed

Project Converter: Wrong @rpc annotations #62832

nathanfranke opened this issue Jul 8, 2022 · 3 comments · Fixed by #63887
Assignees
Milestone

Comments

@nathanfranke
Copy link
Contributor

Godot version

5268efd

System information

n/a

Issue description

Looks like it's using @rpc(any), @rpc(auth), @rpc(sync).

Correct: @rpc(any_peer), @rpc(authority), @rpc(call_local) and related.

Also there seems to be sync func which I don't think is valid.

https://github.com/godotengine/godot/blob/master/editor/project_converter_3_to_4.cpp#L3727-L3789

Steps to reproduce

Minimal reproduction project

No response

@qarmin
Copy link
Contributor

qarmin commented Aug 2, 2022

Can you list all the 3.x -> 4.0 network keyword name changes?
My knowledge of network topics in Godot is rather poor, so I am not able to verify their correctness.
About the conversions present in the converter I once asked @Faless, but looks that now this info is outdated or I messed something when preparing conversions.

@nathanfranke
Copy link
Contributor Author

remote -> @rpc(any_peer)
remotesync -> @rpc(any_peer, call_local)
puppet -> @rpc
puppetsync -> @rpc(call_local)

These should print a warning (if possible):

The master and mastersync rpc behavior is not officially supported anymore. Try using another keyword or making custom logic using get_multiplayer().get_remote_sender_id()

master -> @rpc
mastersync -> @rpc(call_local)

@raulsntos
Copy link
Member

raulsntos commented Aug 5, 2022

As far as I know the sync and slave keywords were deprecated but still in exist in 3.x for compatibility so some user might still be using them and we may want to add a conversion for them. See #22087 for context.

Essentially, sync is the same as remotesync and slave is the same as puppet. So I guess:

sync -> @rpc(any_peer, call_local)
slave -> @rpc

Edit: Opened #63985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants