diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-10-01 21:35:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 21:35:08 +0200 |
commit | 366e374f764f8782e38414d3b972fb0f244084b7 (patch) | |
tree | 7805095517a84471305fd903d8fd698da8c361e1 /modules/gdscript/gdscript_parser.cpp | |
parent | 53051246657c38f02ade022b810e251919b15122 (diff) | |
parent | 24a949ea1154a2298e6898c53fdb75178affe098 (diff) | |
download | redot-engine-366e374f764f8782e38414d3b972fb0f244084b7.tar.gz |
Merge pull request #53290 from Faless/mp/4.x_opts_names
[Net] Rename RPC constants and annotation arguments.
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 4e71eb32e9..63817e970a 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3481,22 +3481,22 @@ bool GDScriptParser::network_annotations(const AnnotationNode *p_annotation, Nod } for (int i = last; i >= 0; i--) { String mode = p_annotation->resolved_arguments[i].operator String(); - if (mode == "any") { - rpc_config.rpc_mode = Multiplayer::RPC_MODE_ANY; - } else if (mode == "auth") { + if (mode == "any_peer") { + rpc_config.rpc_mode = Multiplayer::RPC_MODE_ANY_PEER; + } else if (mode == "authority") { rpc_config.rpc_mode = Multiplayer::RPC_MODE_AUTHORITY; - } else if (mode == "sync") { + } else if (mode == "call_local") { rpc_config.sync = true; - } else if (mode == "nosync") { + } else if (mode == "call_remote") { rpc_config.sync = false; } else if (mode == "reliable") { rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_RELIABLE; } else if (mode == "unreliable") { rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_UNRELIABLE; - } else if (mode == "ordered") { - rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_ORDERED; + } else if (mode == "unreliable_ordered") { + rpc_config.transfer_mode = Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED; } else { - push_error(R"(Invalid RPC argument. Must be one of: 'sync'/'nosync' (local calls), 'any'/'auth' (permission), 'reliable'/'unreliable'/'ordered' (transfer mode).)", p_annotation); + push_error(R"(Invalid RPC argument. Must be one of: 'call_local'/'no_call_local' (local calls), 'any_peer'/'authority' (permission), 'reliable'/'unreliable'/'unreliable_ordered' (transfer mode).)", p_annotation); } } } |