1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Merge pull request #48331 from Faless/net/4.x_enet_relay_lax

[Net] ENet non-relaying server now process broadcasts.
This commit is contained in:
Rémi Verschelde
2021-06-17 12:26:54 +02:00
committed by GitHub

View File

@@ -362,7 +362,10 @@ void NetworkedMultiplayerENet::poll() {
// To myself and only myself // To myself and only myself
incoming_packets.push_back(packet); incoming_packets.push_back(packet);
} else if (!server_relay) { } 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; continue;
} else if (target == 0) { } else if (target == 0) {
// Re-send to everyone but sender :| // Re-send to everyone but sender :|