Increased resilience to some modded drawables

This commit is contained in:
dexy
2020-02-25 23:30:41 +11:00
Unverified
parent 126848c646
commit a41e7c5eb3
4 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -580,7 +580,7 @@ namespace CodeWalker.Rendering
public override void SetModelVars(DeviceContext context, RenderableModel model)
{
if (model.Owner.Skeleton?.BoneTransforms != null)
if ((model.Owner.Skeleton?.BoneTransforms != null) && (model.Owner.Skeleton.BoneTransforms.Length > 0))
{
SetBoneMatrices(context, model.Owner.Skeleton.BoneTransforms);
defaultBoneMatricesBound = false;
+1 -1
View File
@@ -235,7 +235,7 @@ namespace CodeWalker.Rendering
public override void SetModelVars(DeviceContext context, RenderableModel model)
{
if (model.Owner.Skeleton?.BoneTransforms != null)
if ((model.Owner.Skeleton?.BoneTransforms != null) && (model.Owner.Skeleton.BoneTransforms.Length > 0))
{
SetBoneMatrices(context, model.Owner.Skeleton.BoneTransforms);
defaultBoneMatricesBound = false;