Fix for loading scenarios with empty chains

This commit is contained in:
dexy 2022-01-10 21:35:01 +11:00
parent eb12b5ddcd
commit 9904b619c1

View File

@ -319,6 +319,8 @@ namespace CodeWalker.World
{
chainedges.Clear();
if (chain.EdgeIds != null)
{
foreach (var edgeId in chain.EdgeIds)
{
if (edgeId >= rpe.Length)
@ -346,6 +348,7 @@ namespace CodeWalker.World
chainedges.Add(edge);
}
}
chain.Edges = chainedges.ToArray();
}