mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-12-03 20:32:53 +08:00
Increased resilience to some modded drawables
This commit is contained in:
parent
126848c646
commit
a41e7c5eb3
@ -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)
|
||||
|
8
CodeWalker.RPFExplorer/Properties/launchSettings.json
Normal file
8
CodeWalker.RPFExplorer/Properties/launchSettings.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"profiles": {
|
||||
"CodeWalker.RPFExplorer": {
|
||||
"commandName": "Project",
|
||||
"workingDirectory": ".."
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user