From 76fe97b7c2b975bed7320ed6fee8e488a2ad2aca Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Nov 2023 00:19:30 +1100 Subject: [PATCH] Use GetHashCode for client construction (#21857) --- Content.Client/Construction/ConstructionSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Client/Construction/ConstructionSystem.cs b/Content.Client/Construction/ConstructionSystem.cs index 2ca0f3d706..d0a14860f1 100644 --- a/Content.Client/Construction/ConstructionSystem.cs +++ b/Content.Client/Construction/ConstructionSystem.cs @@ -198,7 +198,7 @@ namespace Content.Client.Construction var comp = EntityManager.GetComponent(ghost.Value); comp.Prototype = prototype; EntityManager.GetComponent(ghost.Value).LocalRotation = dir.ToAngle(); - _ghosts.Add(ghost.Value.Id, ghost.Value); + _ghosts.Add(ghost.GetHashCode(), ghost.Value); var sprite = EntityManager.GetComponent(ghost.Value); sprite.Color = new Color(48, 255, 48, 128); @@ -265,7 +265,7 @@ namespace Content.Client.Construction } var transform = EntityManager.GetComponent(ghostId); - var msg = new TryStartStructureConstructionMessage(GetNetCoordinates(transform.Coordinates), ghostComp.Prototype.ID, transform.LocalRotation, ghostId.Id); + var msg = new TryStartStructureConstructionMessage(GetNetCoordinates(transform.Coordinates), ghostComp.Prototype.ID, transform.LocalRotation, ghostId.GetHashCode()); RaiseNetworkEvent(msg); } -- 2.51.2