1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

ManySample changed to better handle large amount of clients

This commit is contained in:
lidgren
2010-11-03 11:20:31 +00:00
parent 6c3f5447a9
commit 79547ca148

View File

@@ -69,7 +69,11 @@ namespace ManyServer
NetOutgoingMessage outMsg = Server.CreateMessage();
outMsg.Write(dstr);
Server.SendMessage(outMsg, Server.Connections, NetDeliveryMethod.ReliableOrdered, 0);
var conns = Server.Connections;
// resend to ONE random connection
Server.SendMessage(outMsg, conns[NetRandom.Instance.Next(0, conns.Count)], NetDeliveryMethod.ReliableOrdered, 0);
break;
}
}