Prevents FloorOcclusion from breaking rendering (#25960)

* Prevents FloorOcclusion from breaking rendering

* Minor change
This commit is contained in:
DoutorWhite
2024-03-10 14:07:24 -03:00
committed by GitHub
parent 1eb2bcf455
commit 717da4a8f3

View File

@@ -43,9 +43,14 @@ public sealed class FloorOcclusionSystem : SharedFloorOcclusionSystem
private void SetShader(SpriteComponent sprite, bool enabled)
{
var shader = _proto.Index<ShaderPrototype>("HorizontalCut").Instance();
if (sprite.PostShader is not null && sprite.PostShader != shader)
return;
if (enabled)
{
sprite.PostShader = _proto.Index<ShaderPrototype>("HorizontalCut").Instance();
sprite.PostShader = shader;
}
else
{