// Send a packet to every player connected to the server func (game *Game) multicastPacket(packet []byte, except interface{}) { for _, player := range game.players { if player == except { continue } player.TransmitPacket(packet) } }
// Send a packet to every player connected to the server func (game *Game) multicastPacket(pkt proto.IPacket, except *player.Player) { data := game.txPktSerial.SerializePackets(pkt) for _, player := range game.players { if player == except { continue } player.TransmitPacket(data) } }