using Barotrauma; using Barotrauma.Networking; namespace MoreLevelContent.Networking { /// /// Server /// public static partial class NetUtil { /// /// Send a message to the specified client /// /// /// /// internal static void SendClient(IWriteMessage outMsg, NetworkConnection connection, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable) { if (GameMain.IsSingleplayer) return; GameMain.LuaCs.Networking.Send(outMsg, connection, deliveryMethod); } /// /// Send message to all connected clients /// /// /// internal static void SendAll(IWriteMessage outMsg, DeliveryMethod deliveryMethod = DeliveryMethod.Reliable) { if (GameMain.IsSingleplayer) return; GameMain.LuaCs.Networking.Send(outMsg, null, deliveryMethod); } } }