Merge pull request #154 from alexguirre/fix-wrapper-sound

Fix reading/writing of Dat54WrapperSound
This commit is contained in:
dexyfex 2022-03-20 11:03:52 +11:00 committed by GitHub
commit ba1d465eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2673,11 +2673,12 @@ namespace CodeWalker.GameFiles
MinRepeatTime = br.ReadInt16();
VariableCount = br.ReadByte();
VariableNames = new MetaHash[VariableCount];
VariableValues = new byte[VariableCount];
for (int i = 0; i < VariableCount; i++)
{
VariableNames[i] = br.ReadUInt32();
VariableValues[i] = br.ReadByte();
}
VariableValues = br.ReadBytes(VariableCount);
ChildSoundsHashes = new[] { ChildSound, FallBackSound };
}
@ -2743,13 +2744,8 @@ namespace CodeWalker.GameFiles
for (int i = 0; i < VariableCount; i++)
{
bw.Write(VariableNames[i]);
bw.Write(VariableValues[i]);
}
if (VariableValues != null)
{
bw.Write(VariableValues);
}
else
{ }
}
public override uint[] GetHashTableOffsets()
{