mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 19:54:27 +00:00
Optmized data sent during RPC and RSet calls.
- Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
This commit is contained in:
parent
70dd7f4e1a
commit
eb07e87981
19 changed files with 1580 additions and 292 deletions
|
|
@ -93,10 +93,42 @@ void PluginScriptInstance::notification(int p_notification) {
|
|||
_desc->notification(_data, p_notification);
|
||||
}
|
||||
|
||||
Vector<ScriptNetData> PluginScriptInstance::get_rpc_methods() const {
|
||||
return _script->get_rpc_methods();
|
||||
}
|
||||
|
||||
uint16_t PluginScriptInstance::get_rpc_method_id(const StringName &p_variable) const {
|
||||
return _script->get_rpc_method_id(p_variable);
|
||||
}
|
||||
|
||||
StringName PluginScriptInstance::get_rpc_method(uint16_t p_id) const {
|
||||
return _script->get_rpc_method(p_id);
|
||||
}
|
||||
|
||||
MultiplayerAPI::RPCMode PluginScriptInstance::get_rpc_mode_by_id(uint16_t p_id) const {
|
||||
return _script->get_rpc_mode_by_id(p_id);
|
||||
}
|
||||
|
||||
MultiplayerAPI::RPCMode PluginScriptInstance::get_rpc_mode(const StringName &p_method) const {
|
||||
return _script->get_rpc_mode(p_method);
|
||||
}
|
||||
|
||||
Vector<ScriptNetData> PluginScriptInstance::get_rset_properties() const {
|
||||
return _script->get_rset_properties();
|
||||
}
|
||||
|
||||
uint16_t PluginScriptInstance::get_rset_property_id(const StringName &p_variable) const {
|
||||
return _script->get_rset_property_id(p_variable);
|
||||
}
|
||||
|
||||
StringName PluginScriptInstance::get_rset_property(uint16_t p_id) const {
|
||||
return _script->get_rset_property(p_id);
|
||||
}
|
||||
|
||||
MultiplayerAPI::RPCMode PluginScriptInstance::get_rset_mode_by_id(uint16_t p_id) const {
|
||||
return _script->get_rset_mode_by_id(p_id);
|
||||
}
|
||||
|
||||
MultiplayerAPI::RPCMode PluginScriptInstance::get_rset_mode(const StringName &p_variable) const {
|
||||
return _script->get_rset_mode(p_variable);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue