From 8592efede5adcf2c36f7e21edbd0db4ad1aa582e Mon Sep 17 00:00:00 2001 From: kianzzarrin Date: Sun, 12 Jun 2022 22:16:48 +0300 Subject: [PATCH] DC path for nodeless --- NodeController/NodeController.csproj | 2 +- NodeController/Patches/Nodeless/NodesLengthPatch.cs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NodeController/NodeController.csproj b/NodeController/NodeController.csproj index 3a85834..d0b14bd 100644 --- a/NodeController/NodeController.csproj +++ b/NodeController/NodeController.csproj @@ -7,7 +7,7 @@ NodeController Copyright © 2020 false - 2.8.0.* + 2.8.1.* 512 latest full diff --git a/NodeController/Patches/Nodeless/NodesLengthPatch.cs b/NodeController/Patches/Nodeless/NodesLengthPatch.cs index a0fb967..127cc33 100644 --- a/NodeController/Patches/Nodeless/NodesLengthPatch.cs +++ b/NodeController/Patches/Nodeless/NodesLengthPatch.cs @@ -39,10 +39,15 @@ static int NodesLength(int length0, ushort nodeID, uint instanceIndex) { ref var renderData = ref RenderManager.instance.m_instances[instanceIndex]; ref var node = ref nodeID.ToNode(); ushort segmentID = node.GetSegment(renderData.m_dataInt0 & 7); - ushort segmentID2 = node.GetSegment(renderData.m_dataInt0 >> 4); var segmentData = SegmentEndManager.Instance.GetAt(segmentID: segmentID, nodeID: nodeID); - var segmentData2 = SegmentEndManager.Instance.GetAt(segmentID: segmentID2, nodeID: nodeID); - nodeless = (segmentData?.IsNodeless ?? false) || (segmentData2?.IsNodeless ?? false); + bool dc = (renderData.m_dataInt0 & 8) != 0; + if (dc) { + ushort segmentID2 = node.GetSegment(renderData.m_dataInt0 >> 4); + var segmentData2 = SegmentEndManager.Instance.GetAt(segmentID: segmentID2, nodeID: nodeID); + nodeless = (segmentData?.IsNodeless ?? false) || (segmentData2?.IsNodeless ?? false); + } else { + nodeless = segmentData?.IsNodeless ?? false; + } } if(nodeless) return 0;