]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
add a type specifier where one was forgor (#29250)
authorIProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
Thu, 20 Jun 2024 10:04:07 +0000 (06:04 -0400)
committerGitHub <noreply@github.com>
Thu, 20 Jun 2024 10:04:07 +0000 (20:04 +1000)
* add a type specifier where one was forgor

* Fix other way because degub conditions

* okay this feels kinda dumb but it does fix it.

* Update Content.Client/Effects/ColorFlashEffectSystem.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Content.Client/Effects/ColorFlashEffectSystem.cs

index 0570b4951ecfbe99a9d2cf731893b75168c5332b..956c9465244200243ba5e3eab0dfa6a93ed778fe 100644 (file)
@@ -109,12 +109,12 @@ public sealed class ColorFlashEffectSystem : SharedColorFlashEffectSystem
                 continue;
             }
 
-#if DEBUG
             if (!TryComp(ent, out ColorFlashEffectComponent? comp))
             {
+#if DEBUG
                 DebugTools.Assert(!_animation.HasRunningAnimation(ent, AnimationKey));
-            }
 #endif
+            }
 
             _animation.Stop(ent, AnimationKey);
             var animation = GetDamageAnimation(ent, color, sprite);
@@ -124,7 +124,7 @@ public sealed class ColorFlashEffectSystem : SharedColorFlashEffectSystem
                 continue;
             }
 
-            comp = EnsureComp<ColorFlashEffectComponent>(ent);
+            EnsureComp<ColorFlashEffectComponent>(ent, out comp);
             comp.NetSyncEnabled = false;
             comp.Color = sprite.Color;