mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-17 16:08:09 +08:00
Peds form beginnings, new MetaNames, updated index field types for Bone, added EBoneFlags
This commit is contained in:
@@ -279,14 +279,14 @@ namespace CodeWalker.Rendering
|
||||
else if (!usepose) //when using the skeleton's matrices, they need to be transformed by parent
|
||||
{
|
||||
trans.Column4 = Vector4.UnitW;
|
||||
ushort[] pinds = skeleton.ParentIndices;
|
||||
ushort parentind = ((pinds != null) && (boneidx < pinds.Length)) ? pinds[boneidx] : (ushort)65535;
|
||||
while (parentind < pinds.Length)
|
||||
short[] pinds = skeleton.ParentIndices;
|
||||
short parentind = ((pinds != null) && (boneidx < pinds.Length)) ? pinds[boneidx] : (short)-1;
|
||||
while ((parentind >= 0) && (parentind < pinds.Length))
|
||||
{
|
||||
Matrix ptrans = (parentind < modeltransforms.Length) ? modeltransforms[parentind] : Matrix.Identity;
|
||||
ptrans.Column4 = Vector4.UnitW;
|
||||
trans = Matrix.Multiply(ptrans, trans);
|
||||
parentind = ((pinds != null) && (parentind < pinds.Length)) ? pinds[parentind] : (ushort)65535;
|
||||
parentind = ((pinds != null) && (parentind < pinds.Length)) ? pinds[parentind] : (short)-1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1136,7 +1136,7 @@ namespace CodeWalker.Rendering
|
||||
if (xforms != null)//how to use xforms? bind pose?
|
||||
{
|
||||
var xform = (i < xforms.Length) ? xforms[i] : Matrix.Identity;
|
||||
var pxform = (pind < xforms.Length) ? xforms[pind] : Matrix.Identity;
|
||||
var pxform = ((pind >= 0) && (pind < xforms.Length)) ? xforms[pind] : Matrix.Identity;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user