mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[VisualCloneFix] nullcheck bone
This commit is contained in:
parent
7bcf37b42c
commit
bef2440b23
2 changed files with 9 additions and 4 deletions
1
Portals/format.json
Normal file
1
Portals/format.json
Normal file
|
@ -0,0 +1 @@
|
|||
"None"
|
|
@ -101,10 +101,14 @@ public static class Patches
|
|||
int[] vertexIndices = new int[sharedMesh.vertexCount];
|
||||
|
||||
// Pre-map bone transforms to their exclusion ids if applicable
|
||||
int[] boneIndexToExclusionId = new int[renderer.bones.Length];
|
||||
for (int i = 0; i < renderer.bones.Length; i++)
|
||||
if (exclusions.TryGetValue(renderer.bones[i], out FPRExclusion exclusion))
|
||||
boneIndexToExclusionId[i] = ((MeshHiderExclusion)exclusion.behaviour).id;
|
||||
var bones = renderer.bones;
|
||||
int[] boneIndexToExclusionId = new int[bones.Length];
|
||||
for (int i = 0; i < bones.Length; i++)
|
||||
{
|
||||
Transform bone = bones[i];
|
||||
if (bone != null && exclusions.TryGetValue(bone, out FPRExclusion exclusion))
|
||||
boneIndexToExclusionId[i] = ((MeshHiderExclusion)(exclusion.behaviour)).id;
|
||||
}
|
||||
|
||||
const float minWeightThreshold = 0.2f;
|
||||
for (int i = 0; i < boneWeights.Length; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue