]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevents FloorOcclusion from breaking rendering (#25960)
authorDoutorWhite <68350815+DoutorWhite@users.noreply.github.com>
Sun, 10 Mar 2024 17:07:24 +0000 (14:07 -0300)
committerGitHub <noreply@github.com>
Sun, 10 Mar 2024 17:07:24 +0000 (04:07 +1100)
* Prevents FloorOcclusion from breaking rendering

* Minor change

Content.Client/Movement/Systems/FloorOcclusionSystem.cs

index 27ba99b3aa3db42c02cac1b7138cc1b117d53ee5..5c75f25ca2d90623805b9a56fa74d41a3e47ee7a 100644 (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
         {