summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/networked_multiplayer_peer.cpp2
-rw-r--r--core/io/networked_multiplayer_peer.h2
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp8
-rw-r--r--scene/main/scene_main_loop.cpp6
4 files changed, 9 insertions, 9 deletions
diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp
index a771ba06b7..47e5f3729c 100644
--- a/core/io/networked_multiplayer_peer.cpp
+++ b/core/io/networked_multiplayer_peer.cpp
@@ -17,8 +17,8 @@ void NetworkedMultiplayerPeer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections );
BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE );
+ BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE_ORDERED );
BIND_CONSTANT( TRANSFER_MODE_RELIABLE );
- BIND_CONSTANT( TRANSFER_MODE_ORDERED );
BIND_CONSTANT( CONNECTION_DISCONNECTED );
BIND_CONSTANT( CONNECTION_CONNECTING );
diff --git a/core/io/networked_multiplayer_peer.h b/core/io/networked_multiplayer_peer.h
index 1c39096ab5..485200a9a9 100644
--- a/core/io/networked_multiplayer_peer.h
+++ b/core/io/networked_multiplayer_peer.h
@@ -17,8 +17,8 @@ public:
};
enum TransferMode {
TRANSFER_MODE_UNRELIABLE,
+ TRANSFER_MODE_UNRELIABLE_ORDERED,
TRANSFER_MODE_RELIABLE,
- TRANSFER_MODE_ORDERED
};
enum ConnectionStatus {
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 5433afdfdd..dd83a1ac5d 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -371,10 +371,10 @@ Error NetworkedMultiplayerENet::put_packet(const uint8_t *p_buffer,int p_buffer_
case TRANSFER_MODE_UNRELIABLE: {
packet_flags=ENET_PACKET_FLAG_UNSEQUENCED;
} break;
- case TRANSFER_MODE_RELIABLE: {
- packet_flags=ENET_PACKET_FLAG_RELIABLE;
+ case TRANSFER_MODE_UNRELIABLE_ORDERED: {
+ packet_flags=0;
} break;
- case TRANSFER_MODE_ORDERED: {
+ case TRANSFER_MODE_RELIABLE: {
packet_flags=ENET_PACKET_FLAG_RELIABLE;
} break;
}
@@ -513,7 +513,7 @@ NetworkedMultiplayerENet::NetworkedMultiplayerENet(){
unique_id=0;
target_peer=0;
current_packet.packet=NULL;
- transfer_mode=TRANSFER_MODE_ORDERED;
+ transfer_mode=TRANSFER_MODE_RELIABLE;
connection_status=CONNECTION_DISCONNECTED;
}
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index f025c5edfd..e161bd7334 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -1841,14 +1841,14 @@ void SceneTree::_rpc(Node* p_from,int p_to,bool p_unreliable,bool p_set,const St
add_path_message[2]=psc->id;
network_peer->set_target_peer(E->get()); //to all of you
- network_peer->set_transfer_mode(NetworkedMultiplayerPeer::TRANSFER_MODE_ORDERED);
+ network_peer->set_transfer_mode(NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE);
network_peer->put_var(add_path_message); //a message with love
psc->confirmed_peers.insert(E->get(),false); //insert into confirmed, but as false since it was not confirmed
}
//take chance and set transfer mode, since all send methods will use it
- network_peer->set_transfer_mode(p_unreliable ? NetworkedMultiplayerPeer::TRANSFER_MODE_UNRELIABLE : NetworkedMultiplayerPeer::TRANSFER_MODE_ORDERED);
+ network_peer->set_transfer_mode(p_unreliable ? NetworkedMultiplayerPeer::TRANSFER_MODE_UNRELIABLE : NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE);
if (has_all_peers) {
@@ -1993,7 +1993,7 @@ void SceneTree::_network_process_packet(int p_from, const Array& p_packet) {
path_get_cache[p_from].nodes[id]=ni;
- network_peer->set_transfer_mode(NetworkedMultiplayerPeer::TRANSFER_MODE_ORDERED);
+ network_peer->set_transfer_mode(NetworkedMultiplayerPeer::TRANSFER_MODE_RELIABLE);
network_peer->set_target_peer(p_from);
Array message;