private static void WriteMapBase(BinaryWriter bw, MapObject obj) { bw.Write(obj.Visgroups.Except(obj.AutoVisgroups).FirstOrDefault()); bw.WriteRGBColour(obj.Colour); bw.Write(obj.Children.Count); foreach (var mo in obj.Children) { WriteMapObject(bw, mo); } }