Fix construction pathfinding crash on machines when going the wrong way.

This commit is contained in:
Vera Aguilera Puerto
2021-11-01 16:56:33 +01:00
parent 726ffde4a1
commit 182a52914a

View File

@@ -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;
}