summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/nativescript/godot_nativescript.cpp4
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp6
-rw-r--r--modules/gdnative/nativescript/nativescript.h6
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.cpp10
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.h6
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.cpp8
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h4
9 files changed, 24 insertions, 24 deletions
diff --git a/modules/gdnative/nativescript/godot_nativescript.cpp b/modules/gdnative/nativescript/godot_nativescript.cpp
index 70b14836bf..dadd1a9d10 100644
--- a/modules/gdnative/nativescript/godot_nativescript.cpp
+++ b/modules/gdnative/nativescript/godot_nativescript.cpp
@@ -127,9 +127,9 @@ void GDAPI godot_nativescript_register_method(void *p_gdnative_handle, const cha
E->get().methods.insert(p_function_name, method);
if (p_attr.rpc_type != GODOT_METHOD_RPC_MODE_DISABLED) {
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCConfig nd;
nd.name = String(p_name);
- nd.rpc_mode = MultiplayerAPI::RPCMode(p_attr.rpc_type);
+ nd.rpc_mode = Multiplayer::RPCMode(p_attr.rpc_type);
E->get().rpc_methods.push_back(nd);
}
}
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 26d3aed702..92ba9bd452 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -431,9 +431,9 @@ void NativeScript::get_script_property_list(List<PropertyInfo> *p_list) const {
}
}
-const Vector<MultiplayerAPI::RPCConfig> NativeScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> NativeScript::get_rpc_methods() const {
NativeScriptDesc *script_data = get_script_desc();
- ERR_FAIL_COND_V(!script_data, Vector<MultiplayerAPI::RPCConfig>());
+ ERR_FAIL_COND_V(!script_data, Vector<Multiplayer::RPCConfig>());
return script_data->rpc_methods;
}
@@ -828,7 +828,7 @@ Ref<Script> NativeScriptInstance::get_script() const {
return script;
}
-const Vector<MultiplayerAPI::RPCConfig> NativeScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> NativeScriptInstance::get_rpc_methods() const {
return script->get_rpc_methods();
}
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index 777a878660..a7647e8c59 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -71,7 +71,7 @@ struct NativeScriptDesc {
};
Map<StringName, Method> methods;
- Vector<MultiplayerAPI::RPCConfig> rpc_methods;
+ Vector<Multiplayer::RPCConfig> rpc_methods;
OrderedHashMap<StringName, Property> properties;
Map<StringName, Signal> signals_; // QtCreator doesn't like the name signals
StringName base;
@@ -175,7 +175,7 @@ public:
virtual void get_script_method_list(List<MethodInfo> *p_list) const override;
virtual void get_script_property_list(List<PropertyInfo> *p_list) const override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
String get_class_documentation() const;
String get_method_documentation(const StringName &p_method) const;
@@ -213,7 +213,7 @@ public:
String to_string(bool *r_valid);
virtual Ref<Script> get_script() const;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
virtual ScriptLanguage *get_language();
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.cpp b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
index 9908ed4533..575d5f5060 100644
--- a/modules/gdnative/net/multiplayer_peer_gdnative.cpp
+++ b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
@@ -72,14 +72,14 @@ int MultiplayerPeerGDNative::get_transfer_channel() const {
return interface->get_transfer_channel(interface->data);
}
-void MultiplayerPeerGDNative::set_transfer_mode(TransferMode p_mode) {
+void MultiplayerPeerGDNative::set_transfer_mode(Multiplayer::TransferMode p_mode) {
ERR_FAIL_COND(interface == nullptr);
interface->set_transfer_mode(interface->data, (godot_int)p_mode);
}
-MultiplayerPeer::TransferMode MultiplayerPeerGDNative::get_transfer_mode() const {
- ERR_FAIL_COND_V(interface == nullptr, TRANSFER_MODE_UNRELIABLE);
- return (TransferMode)interface->get_transfer_mode(interface->data);
+Multiplayer::TransferMode MultiplayerPeerGDNative::get_transfer_mode() const {
+ ERR_FAIL_COND_V(interface == nullptr, Multiplayer::TRANSFER_MODE_UNRELIABLE);
+ return (Multiplayer::TransferMode)interface->get_transfer_mode(interface->data);
}
void MultiplayerPeerGDNative::set_target_peer(int p_peer_id) {
@@ -124,7 +124,7 @@ MultiplayerPeer::ConnectionStatus MultiplayerPeerGDNative::get_connection_status
void MultiplayerPeerGDNative::_bind_methods() {
ADD_PROPERTY_DEFAULT("transfer_channel", 0);
- ADD_PROPERTY_DEFAULT("transfer_mode", TRANSFER_MODE_UNRELIABLE);
+ ADD_PROPERTY_DEFAULT("transfer_mode", Multiplayer::TRANSFER_MODE_UNRELIABLE);
ADD_PROPERTY_DEFAULT("refuse_new_connections", true);
}
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.h b/modules/gdnative/net/multiplayer_peer_gdnative.h
index ab084faae6..33e424d284 100644
--- a/modules/gdnative/net/multiplayer_peer_gdnative.h
+++ b/modules/gdnative/net/multiplayer_peer_gdnative.h
@@ -31,7 +31,7 @@
#ifndef MULTIPLAYER_PEER_GDNATIVE_H
#define MULTIPLAYER_PEER_GDNATIVE_H
-#include "core/io/multiplayer_peer.h"
+#include "core/multiplayer/multiplayer_peer.h"
#include "modules/gdnative/gdnative.h"
#include "modules/gdnative/include/net/godot_net.h"
@@ -58,8 +58,8 @@ public:
/* Specific to MultiplayerPeer */
virtual void set_transfer_channel(int p_channel) override;
virtual int get_transfer_channel() const override;
- virtual void set_transfer_mode(TransferMode p_mode) override;
- virtual TransferMode get_transfer_mode() const override;
+ virtual void set_transfer_mode(Multiplayer::TransferMode p_mode) override;
+ virtual Multiplayer::TransferMode get_transfer_mode() const override;
virtual void set_target_peer(int p_peer_id) override;
virtual int get_packet_peer() const override;
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index ed1c0af3ed..feae81397e 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -100,7 +100,7 @@ String PluginScriptInstance::to_string(bool *r_valid) {
return str_ret;
}
-const Vector<MultiplayerAPI::RPCConfig> PluginScriptInstance::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> PluginScriptInstance::get_rpc_methods() const {
return _script->get_rpc_methods();
}
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h
index 25b62ae8ab..bdae265db2 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.h
+++ b/modules/gdnative/pluginscript/pluginscript_instance.h
@@ -71,7 +71,7 @@ public:
void set_path(const String &p_path);
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const;
virtual void refcount_incremented();
virtual bool refcount_decremented();
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp
index 5380858582..2b4ceda49d 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_script.cpp
@@ -334,9 +334,9 @@ Error PluginScript::reload(bool p_keep_state) {
// rpc_mode is passed as an optional field and is not part of MethodInfo
Variant var = v["rpc_mode"];
if (var != Variant()) {
- MultiplayerAPI::RPCConfig nd;
+ Multiplayer::RPCConfig nd;
nd.name = mi.name;
- nd.rpc_mode = MultiplayerAPI::RPCMode(int(var));
+ nd.rpc_mode = Multiplayer::RPCMode(int(var));
// TODO Transfer Channel
if (_rpc_methods.find(nd) == -1) {
_rpc_methods.push_back(nd);
@@ -345,7 +345,7 @@ Error PluginScript::reload(bool p_keep_state) {
}
// Sort so we are 100% that they are always the same.
- _rpc_methods.sort_custom<MultiplayerAPI::SortRPCConfig>();
+ _rpc_methods.sort_custom<Multiplayer::SortRPCConfig>();
Array *signals = (Array *)&manifest.signals;
for (int i = 0; i < signals->size(); ++i) {
@@ -484,7 +484,7 @@ int PluginScript::get_member_line(const StringName &p_member) const {
return -1;
}
-const Vector<MultiplayerAPI::RPCConfig> PluginScript::get_rpc_methods() const {
+const Vector<Multiplayer::RPCConfig> PluginScript::get_rpc_methods() const {
return _rpc_methods;
}
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index 838195147f..1a12a130d1 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -61,7 +61,7 @@ private:
Map<StringName, PropertyInfo> _properties_info;
Map<StringName, MethodInfo> _signals_info;
Map<StringName, MethodInfo> _methods_info;
- Vector<MultiplayerAPI::RPCConfig> _rpc_methods;
+ Vector<Multiplayer::RPCConfig> _rpc_methods;
Set<Object *> _instances;
//exported members
@@ -136,7 +136,7 @@ public:
virtual int get_member_line(const StringName &p_member) const override;
- virtual const Vector<MultiplayerAPI::RPCConfig> get_rpc_methods() const override;
+ virtual const Vector<Multiplayer::RPCConfig> get_rpc_methods() const override;
PluginScript();
void init(PluginScriptLanguage *language);