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];
|
int[] vertexIndices = new int[sharedMesh.vertexCount];
|
||||||
|
|
||||||
// Pre-map bone transforms to their exclusion ids if applicable
|
// Pre-map bone transforms to their exclusion ids if applicable
|
||||||
int[] boneIndexToExclusionId = new int[renderer.bones.Length];
|
var bones = renderer.bones;
|
||||||
for (int i = 0; i < renderer.bones.Length; i++)
|
int[] boneIndexToExclusionId = new int[bones.Length];
|
||||||
if (exclusions.TryGetValue(renderer.bones[i], out FPRExclusion exclusion))
|
for (int i = 0; i < bones.Length; i++)
|
||||||
boneIndexToExclusionId[i] = ((MeshHiderExclusion)exclusion.behaviour).id;
|
{
|
||||||
|
Transform bone = bones[i];
|
||||||
|
if (bone != null && exclusions.TryGetValue(bone, out FPRExclusion exclusion))
|
||||||
|
boneIndexToExclusionId[i] = ((MeshHiderExclusion)(exclusion.behaviour)).id;
|
||||||
|
}
|
||||||
|
|
||||||
const float minWeightThreshold = 0.2f;
|
const float minWeightThreshold = 0.2f;
|
||||||
for (int i = 0; i < boneWeights.Length; i++)
|
for (int i = 0; i < boneWeights.Length; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue