summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-17 12:26:54 +0200
committerGitHub <noreply@github.com>2021-06-17 12:26:54 +0200
commitb3e333bcf28c3cc39432e71d53135c20c76f4ad8 (patch)
treeb95550b0a58af0beee8ce0c462df15d38fd6cdb9
parent74850b3511736ddc59a55c7e9a52402c3c27a538 (diff)
parentfc255bde298575ba368ded56f6ff5b4799a787c5 (diff)
Merge pull request #48331 from Faless/net/4.x_enet_relay_lax
[Net] ENet non-relaying server now process broadcasts.
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 9491373013..94260e8c13 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -362,7 +362,10 @@ void NetworkedMultiplayerENet::poll() {
// To myself and only myself
incoming_packets.push_back(packet);
} else if (!server_relay) {
- // No other destination is allowed when server is not relaying
+ // When relaying is disabled, other destinations will only be processed by the server.
+ if (target == 0 || target < -1) {
+ incoming_packets.push_back(packet);
+ }
continue;
} else if (target == 0) {
// Re-send to everyone but sender :|