public void Dispose() { Header = new studiohdr_t(); Header2 = new studiohdr2_t(); BR.Dispose(); if (stream != null) { stream.Dispose(); } }
void ParseHeader2() { if (Header.studiohdr2index == 0) { return; } BR.BaseStream.Seek(Header.studiohdr2index, SeekOrigin.Begin); Header2 = new studiohdr2_t(); Header2.numsrcbonetransform = BR.ReadInt32(); Header2.srcbonetransformindex = BR.ReadInt32(); Header2.illumpositionattachmentindex = BR.ReadInt32(); Header2.flMaxEyeDeflection = BR.ReadSingle(); Header2.linearboneindex = BR.ReadInt32(); Header2.sznameindex = BR.ReadInt32(); Header2.m_nBoneFlexDriverCount = BR.ReadInt32(); Header2.m_nBoneFlexDriverIndex = BR.ReadInt32(); Header2.m_nBodyGroupPresetCount = BR.ReadInt32(); Header2.m_nBodyGroupPresetIndex = BR.ReadInt32(); Header2.padding_unused = BR.ReadInt32(); //Header2.reserved = BR.ReadInt32Array(44); BR.BaseStream.Seek(176, SeekOrigin.Current); }