]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix do_after net initial item (#20363)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 20 Sep 2023 12:01:54 +0000 (22:01 +1000)
committerGitHub <noreply@github.com>
Wed, 20 Sep 2023 12:01:54 +0000 (22:01 +1000)
Content.Shared/DoAfter/SharedDoAfterSystem.cs

index 815310f7f1cd5bad004b6000faf9017c56974c46..691d9a47582459188efc1edffb2f3be9e7695098 100644 (file)
@@ -206,9 +206,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
         id = new DoAfterId(args.User, comp.NextId++);
         var doAfter = new DoAfter(id.Value.Index, args, GameTiming.CurTime);
 
-        // Networking yay
-        doAfter.NetInitialItem = GetNetEntity(doAfter.InitialItem);
-
         // Networking yay
         args.NetTarget = GetNetEntity(args.Target);
         args.NetUsed = GetNetEntity(args.Used);
@@ -238,6 +235,8 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
             doAfter.InitialItem = handsComponent.ActiveHandEntity;
         }
 
+        doAfter.NetInitialItem = GetNetEntity(doAfter.InitialItem);
+
         // Initial checks
         if (ShouldCancel(doAfter, GetEntityQuery<TransformComponent>(), GetEntityQuery<HandsComponent>()))
             return false;