From 1901fafc501ff734617f42f3b71e16044334a599 Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Tue, 12 Aug 2025 19:00:36 -0400 Subject: [PATCH] fix: fix lights not always enabling correctly (#39585) --- .../Light/EntitySystems/SharedPoweredLightSystem.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Shared/Light/EntitySystems/SharedPoweredLightSystem.cs b/Content.Shared/Light/EntitySystems/SharedPoweredLightSystem.cs index e1dc4be5d0..65097f0d06 100644 --- a/Content.Shared/Light/EntitySystems/SharedPoweredLightSystem.cs +++ b/Content.Shared/Light/EntitySystems/SharedPoweredLightSystem.cs @@ -263,6 +263,14 @@ public abstract class SharedPoweredLightSystem : EntitySystem AppearanceComponent? appearance = null, EntityUid? user = null) { + // We don't do anything during state application on the client as if + // it's due to an entity spawn, we'd have to wait for component init to + // be able to do anything, despite the server having already sent us the + // state that we need. On the other hand, we still want this to run in + // prediction so we can, well, predict lights turning on. + if (GameTiming.ApplyingState) + return; + if (!Resolve(uid, ref light, false)) return; -- 2.51.2