From 182a52914a830290f42d4d0f09459eb4ff0515bf Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Mon, 1 Nov 2021 16:56:33 +0100 Subject: [PATCH] Fix construction pathfinding crash on machines when going the wrong way. --- .../Construction/ConstructionSystem.Pathfinding.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Content.Server/Construction/ConstructionSystem.Pathfinding.cs b/Content.Server/Construction/ConstructionSystem.Pathfinding.cs index a154aafb22..8d5cdb9a2c 100644 --- a/Content.Server/Construction/ConstructionSystem.Pathfinding.cs +++ b/Content.Server/Construction/ConstructionSystem.Pathfinding.cs @@ -13,10 +13,12 @@ namespace Content.Server.Construction if (!Resolve(uid, ref construction)) return false; - // Null means clear pathfinding target. + // Clear current target, just in case. + ClearPathfinding(uid, construction); + + // Null means clear pathfinding target only. if (targetNodeId == null) { - ClearPathfinding(uid, construction); return true; }