summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_func_nodes.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-05-26 14:07:57 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-06-01 17:24:21 +0200
commitd779b5aa3ee7c2e93304f6c085675f8d3ec7aca5 (patch)
tree37fef87ecf3a68697b6da6bcbdfcb20cc1d9b770 /modules/visual_script/visual_script_func_nodes.cpp
parent0aabfb341a477280befe115926486f2a32f34f0e (diff)
downloadredot-engine-d779b5aa3ee7c2e93304f6c085675f8d3ec7aca5.tar.gz
[Net] Refactor RPCs, remove RSETs
In this PR: - Removed rset - rpc_config can now optionally configure transfer mode (reliable/unreliable/ordered) and channel (channels are not actually implemented yet.) - Refactor how the RPC id is computed to minimize the logic in Node and scripts that now only needs a single `get_rpc_methods` function.
Diffstat (limited to 'modules/visual_script/visual_script_func_nodes.cpp')
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 9310b86627..a0ba7b1962 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -737,20 +737,22 @@ public:
}
int to_id = 0;
- bool reliable = true;
+ //bool reliable = true;
if (rpc_mode >= VisualScriptFunctionCall::RPC_RELIABLE_TO_ID) {
to_id = *p_args[0];
p_args += 1;
p_argcount -= 1;
- if (rpc_mode == VisualScriptFunctionCall::RPC_UNRELIABLE_TO_ID) {
- reliable = false;
- }
- } else if (rpc_mode == VisualScriptFunctionCall::RPC_UNRELIABLE) {
- reliable = false;
+ //if (rpc_mode == VisualScriptFunctionCall::RPC_UNRELIABLE_TO_ID) {
+ //reliable = false;
+ //}
}
+ //else if (rpc_mode == VisualScriptFunctionCall::RPC_UNRELIABLE) {
+ //reliable = false;
+ //}
- node->rpcp(to_id, !reliable, function, p_args, p_argcount);
+ // TODO reliable?
+ node->rpcp(to_id, function, p_args, p_argcount);
return true;
}