]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix doafters always being red for the client (#20187)
authorDrSmugleaf <DrSmugleaf@users.noreply.github.com>
Fri, 15 Sep 2023 00:21:59 +0000 (17:21 -0700)
committerGitHub <noreply@github.com>
Fri, 15 Sep 2023 00:21:59 +0000 (10:21 +1000)
Content.Shared/DoAfter/SharedDoAfterSystem.cs

index 472db8cfd612a3f8a0d7cf75c0958104d83e1e9b..815310f7f1cd5bad004b6000faf9017c56974c46 100644 (file)
@@ -207,7 +207,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
         var doAfter = new DoAfter(id.Value.Index, args, GameTiming.CurTime);
 
         // Networking yay
-        doAfter.NetUserPosition = GetNetCoordinates(doAfter.UserPosition);
         doAfter.NetInitialItem = GetNetEntity(doAfter.InitialItem);
 
         // Networking yay
@@ -226,6 +225,8 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
             doAfter.UserPosition.TryDistance(EntityManager, targetPosition, out doAfter.TargetDistance);
         }
 
+        doAfter.NetUserPosition = GetNetCoordinates(doAfter.UserPosition);
+
         // For this we need to stay on the same hand slot and need the same item in that hand slot
         // (or if there is no item there we need to keep it free).
         if (args.NeedHand && args.BreakOnHandChange)