Skip to content

Commit

Permalink
Fix no lightmap frames writing compressed data
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Sep 13, 2024
1 parent 7bb81bd commit 708faa0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Src/GBX.NET/Engines/Game/CGameCtnChallenge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,12 @@ private void WriteLightMapCacheSmall(CGameCtnChallenge n, GbxWriter w)
w.Write(n.LightmapFrames?.Length ?? 0);
}

foreach (var frame in n.LightmapFrames ?? [])
if (n.LightmapFrames is null || n.LightmapFrames.Length == 0)
{
return;
}

foreach (var frame in n.LightmapFrames)
{
w.WriteWritable(frame, version: lightmapVersion);
}
Expand Down

0 comments on commit 708faa0

Please sign in to comment.