Skip to content

Commit

Permalink
Fix timeline alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
AsgardXIV committed Jul 31, 2022
1 parent 7612e9a commit d59a87a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XAT/XAT/Game/Formats/Pap/PapFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public PapFormat(BinaryReader reader)
for (int i = 0; i < numAnims; i++)
{
timelineList.Add(new TmbFormat(reader));
var requiredPadding = AlignBoundary(reader.BaseStream.Position, i, numAnims);
var requiredPadding = AlignBoundary(reader.BaseStream.Position - timelineOffset, i, numAnims);
_ = reader.ReadBytes(requiredPadding);
}

Expand Down Expand Up @@ -109,7 +109,7 @@ public void Serialize(BinaryWriter writer)
{
var timeline = Animations[i].Timeline;
timeline.Serialize(writer);
var requiredPadding = AlignBoundary(writer.BaseStream.Position, i, Animations.Count);
var requiredPadding = AlignBoundary(writer.BaseStream.Position - timelineOffset, i, Animations.Count);
writer.Write(new byte[requiredPadding]);
}

Expand Down

0 comments on commit d59a87a

Please sign in to comment.