Fix decal error spam (#25172)

This commit is contained in:
metalgearsloth
2024-02-13 18:00:54 +11:00
committed by GitHub
parent 48cccef329
commit 4cec0821e4

View File

@@ -59,8 +59,14 @@ namespace Content.Client.Decals.Overlays
{
foreach (var decal in decals.Values)
{
if (!_cachedTextures.TryGetValue(decal.Id, out var cache) && _prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
if (!_cachedTextures.TryGetValue(decal.Id, out var cache))
{
// Nothing to cache someone messed up
if (!_prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
{
continue;
}
cache = (_sprites.Frame0(decalProto.Sprite), decalProto.SnapCardinals);
_cachedTextures[decal.Id] = cache;
}