mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-25 08:22:54 +08:00
Fix reading/writing of Dat54WrapperSound
This commit is contained in:
parent
8998b8c808
commit
f82f2ea7bf
@ -2673,11 +2673,12 @@ namespace CodeWalker.GameFiles
|
|||||||
MinRepeatTime = br.ReadInt16();
|
MinRepeatTime = br.ReadInt16();
|
||||||
VariableCount = br.ReadByte();
|
VariableCount = br.ReadByte();
|
||||||
VariableNames = new MetaHash[VariableCount];
|
VariableNames = new MetaHash[VariableCount];
|
||||||
|
VariableValues = new byte[VariableCount];
|
||||||
for (int i = 0; i < VariableCount; i++)
|
for (int i = 0; i < VariableCount; i++)
|
||||||
{
|
{
|
||||||
VariableNames[i] = br.ReadUInt32();
|
VariableNames[i] = br.ReadUInt32();
|
||||||
|
VariableValues[i] = br.ReadByte();
|
||||||
}
|
}
|
||||||
VariableValues = br.ReadBytes(VariableCount);
|
|
||||||
|
|
||||||
ChildSoundsHashes = new[] { ChildSound, FallBackSound };
|
ChildSoundsHashes = new[] { ChildSound, FallBackSound };
|
||||||
}
|
}
|
||||||
@ -2743,13 +2744,8 @@ namespace CodeWalker.GameFiles
|
|||||||
for (int i = 0; i < VariableCount; i++)
|
for (int i = 0; i < VariableCount; i++)
|
||||||
{
|
{
|
||||||
bw.Write(VariableNames[i]);
|
bw.Write(VariableNames[i]);
|
||||||
|
bw.Write(VariableValues[i]);
|
||||||
}
|
}
|
||||||
if (VariableValues != null)
|
|
||||||
{
|
|
||||||
bw.Write(VariableValues);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
public override uint[] GetHashTableOffsets()
|
public override uint[] GetHashTableOffsets()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user