mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-13 20:44:50 +08:00
Increased resilience to some modded drawables
This commit is contained in:
@@ -2381,6 +2381,11 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
this.VertexData = this.VertexBuffer.Data1 ?? this.VertexBuffer.Data2;
|
this.VertexData = this.VertexBuffer.Data1 ?? this.VertexBuffer.Data2;
|
||||||
|
|
||||||
|
if (this.VerticesCount == 0)
|
||||||
|
{
|
||||||
|
this.VerticesCount = (ushort)(this.VertexData?.VertexCount ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
//if (VertexBuffer.Data1 != VertexBuffer.Data2)
|
//if (VertexBuffer.Data1 != VertexBuffer.Data2)
|
||||||
//{ }//no hit
|
//{ }//no hit
|
||||||
//if (VertexDataPointer == 0)
|
//if (VertexDataPointer == 0)
|
||||||
|
|||||||
@@ -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)
|
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);
|
SetBoneMatrices(context, model.Owner.Skeleton.BoneTransforms);
|
||||||
defaultBoneMatricesBound = false;
|
defaultBoneMatricesBound = false;
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ namespace CodeWalker.Rendering
|
|||||||
|
|
||||||
public override void SetModelVars(DeviceContext context, RenderableModel model)
|
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);
|
SetBoneMatrices(context, model.Owner.Skeleton.BoneTransforms);
|
||||||
defaultBoneMatricesBound = false;
|
defaultBoneMatricesBound = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user