]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix rcd overlay getting stuck for borg modules (#41648)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Mon, 1 Dec 2025 01:23:04 +0000 (02:23 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Dec 2025 01:23:04 +0000 (01:23 +0000)
fix rcd overlay getting stuck

Content.Client/RCD/RCDConstructionGhostSystem.cs

index fcbe3aece7051c96aa1a18991b39edc3f6aa49fe..d0af28da8aaf90863df1cefb71f97f4b313b1b5a 100644 (file)
@@ -20,7 +20,7 @@ public sealed class RCDConstructionGhostSystem : EntitySystem
     [Dependency] private readonly IPlacementManager _placementManager = default!;
     [Dependency] private readonly IPrototypeManager _protoManager = default!;
     [Dependency] private readonly HandsSystem _hands = default!;
-    
+
     private Direction _placementDirection = default;
 
     public override void Update(float frameTime)
@@ -42,6 +42,11 @@ public sealed class RCDConstructionGhostSystem : EntitySystem
 
         var heldEntity = _hands.GetActiveItem(player);
 
+        // Don't open the placement overlay for client-side RCDs.
+        // This may happen when predictively spawning one in your hands.
+        if (heldEntity != null && IsClientSide(heldEntity.Value))
+            return;
+
         if (!TryComp<RCDComponent>(heldEntity, out var rcd))
         {
             // If the player was holding an RCD, but is no longer, cancel placement
@@ -69,7 +74,7 @@ public sealed class RCDConstructionGhostSystem : EntitySystem
             MobUid = heldEntity.Value,
             PlacementOption = PlacementMode,
             EntityType = prototype.Prototype,
-            Range = (int) Math.Ceiling(SharedInteractionSystem.InteractionRange),
+            Range = (int)Math.Ceiling(SharedInteractionSystem.InteractionRange),
             IsTile = (prototype.Mode == RcdMode.ConstructTile),
             UseEditorContext = false,
         };