Fix maprenderer crash (#13692)

This commit is contained in:
metalgearsloth
2023-01-26 12:08:05 +11:00
committed by GitHub
parent 96b350f927
commit b82622749d

View File

@@ -35,9 +35,12 @@ public sealed class DecalPainter
decals.Sort(Comparer<DecalData>.Create((x, y) => x.Decal.ZIndex.CompareTo(y.Decal.ZIndex))); decals.Sort(Comparer<DecalData>.Create((x, y) => x.Decal.ZIndex.CompareTo(y.Decal.ZIndex)));
foreach (var proto in _sPrototypeManager.EnumeratePrototypes<DecalPrototype>()) if (_decalTextures.Count == 0)
{ {
_decalTextures.Add(proto.ID, proto.Sprite); foreach (var proto in _sPrototypeManager.EnumeratePrototypes<DecalPrototype>())
{
_decalTextures.Add(proto.ID, proto.Sprite);
}
} }
foreach (var decal in decals) foreach (var decal in decals)