public void BroadcastPacket(Package package) { BroadcastPacket(package, true); }
public void BroadcastPacket(Package package, bool self) { foreach (var i in OnlinePlayers.Values) { if (i == null) continue; if (!self && package.Client != null && i.Wrapper.ClientIdentifier == package.Client.ClientIdentifier) continue; package.SetTarget(i.Wrapper); package.Write(); } }
public static void BroadcastPacket(Package packet) { foreach (var lvl in LevelManager.GetLevels()) { lvl.BroadcastPacket(packet); } LevelManager.MainLevel.BroadcastPacket(packet); }