diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index 7ef0045..350438b 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -2381,6 +2381,11 @@ namespace CodeWalker.GameFiles { this.VertexData = this.VertexBuffer.Data1 ?? this.VertexBuffer.Data2; + if (this.VerticesCount == 0) + { + this.VerticesCount = (ushort)(this.VertexData?.VertexCount ?? 0); + } + //if (VertexBuffer.Data1 != VertexBuffer.Data2) //{ }//no hit //if (VertexDataPointer == 0) diff --git a/CodeWalker.RPFExplorer/Properties/launchSettings.json b/CodeWalker.RPFExplorer/Properties/launchSettings.json new file mode 100644 index 0000000..d23493a --- /dev/null +++ b/CodeWalker.RPFExplorer/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "CodeWalker.RPFExplorer": { + "commandName": "Project", + "workingDirectory": ".." + } + } +} \ No newline at end of file diff --git a/CodeWalker/Rendering/Shaders/BasicShader.cs b/CodeWalker/Rendering/Shaders/BasicShader.cs index 974a580..687163e 100644 --- a/CodeWalker/Rendering/Shaders/BasicShader.cs +++ b/CodeWalker/Rendering/Shaders/BasicShader.cs @@ -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; diff --git a/CodeWalker/Rendering/Shaders/ShadowShader.cs b/CodeWalker/Rendering/Shaders/ShadowShader.cs index 9d526cb..8da2a16 100644 --- a/CodeWalker/Rendering/Shaders/ShadowShader.cs +++ b/CodeWalker/Rendering/Shaders/ShadowShader.cs @@ -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;