Skip to content

Commit

Permalink
DC path for nodeless
Browse files Browse the repository at this point in the history
  • Loading branch information
kianzarrin committed Jun 12, 2022
1 parent eb63f57 commit 8592efe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NodeController/NodeController.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Product>NodeController</Product>
<Copyright>Copyright © 2020</Copyright>
<Deterministic>false</Deterministic>
<AssemblyVersion>2.8.0.*</AssemblyVersion>
<AssemblyVersion>2.8.1.*</AssemblyVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>latest</LangVersion>
<DebugType>full</DebugType>
Expand Down
11 changes: 8 additions & 3 deletions NodeController/Patches/Nodeless/NodesLengthPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8592efe

Please sign in to comment.