Fix decal error spam (#25172)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user