public odfSubmesh Clone() { odfSubmesh newSubmesh = new odfSubmesh(Name, Id, _FormatType); newSubmesh.Unknown1 = Unknown1; newSubmesh.AlwaysZero1 = (byte[])AlwaysZero1.Clone(); newSubmesh.MaterialId = new ObjectID(MaterialId); newSubmesh.TextureIds = (ObjectID[])TextureIds.Clone(); newSubmesh.AlwaysZero2 = (byte[])AlwaysZero2.Clone(); newSubmesh.Unknown4 = Unknown4; newSubmesh.Unknown5 = Unknown5; newSubmesh.Unknown6 = Unknown6; if (AlwaysZero3 != null) { newSubmesh.AlwaysZero3 = (byte[])AlwaysZero3.Clone(); } newSubmesh.Unknown7 = Unknown7; newSubmesh.Unknown8 = (byte[])Unknown8.Clone(); newSubmesh.VertexList = new List <odfVertex>(NumVertices); foreach (odfVertex vert in VertexList) { newSubmesh.VertexList.Add(vert.Clone()); } newSubmesh.FaceList = new List <odfFace>(NumVertexIndices / 3); foreach (odfFace face in FaceList) { newSubmesh.FaceList.Add(face.Clone()); } newSubmesh.AlwaysZero4 = (byte[])AlwaysZero4.Clone(); return(newSubmesh); }
public void Read(GamePacketReader reader) { Unknown0 = reader.ReadULong(); Unknown8.Read(reader); PlayerName = reader.ReadWideString(); Unknown20.Read(reader); Unknown30 = reader.ReadWideString(); }