Ped clothes not exploding

This commit is contained in:
dexy
2019-11-29 20:47:11 +11:00
Unverified
parent 181689ac95
commit ef1debfb41
30 changed files with 482 additions and 1507 deletions
+10 -2
View File
@@ -2509,7 +2509,7 @@ namespace CodeWalker.Rendering
return res;
}
public bool RenderDrawable(DrawableBase drawable, Archetype arche, YmapEntityDef entity, uint txdHash = 0, TextureDictionary txdExtra = null, Texture diffOverride = null, ClipMapEntry animClip = null)
public bool RenderDrawable(DrawableBase drawable, Archetype arche, YmapEntityDef entity, uint txdHash = 0, TextureDictionary txdExtra = null, Texture diffOverride = null, ClipMapEntry animClip = null, ClothInstance cloth = null)
{
//enqueue a single drawable for rendering.
@@ -2534,6 +2534,9 @@ namespace CodeWalker.Rendering
rndbl.ResetBoneTransforms();
}
rndbl.Cloth = cloth;
return RenderRenderable(rndbl, arche, entity);
}
@@ -2596,6 +2599,10 @@ namespace CodeWalker.Rendering
{
rndbl.UpdateAnims(currentRealTime);
}
if (rndbl.Cloth != null)
{
rndbl.Cloth.Update(currentRealTime);
}
@@ -2795,6 +2802,7 @@ namespace CodeWalker.Rendering
//var compData = ped.Ymt?.VariationInfo?.GetComponentData(i);
var drawable = ped.Drawables[i];
var texture = ped.Textures[i];
var cloth = ped.Clothes[i];
//if (compData == null) return;
if (drawable == null) return;
@@ -2837,7 +2845,7 @@ namespace CodeWalker.Rendering
if (drawFlag)
{
RenderDrawable(drawable, null, ped.RenderEntity, 0, td, texture, ac);
RenderDrawable(drawable, null, ped.RenderEntity, 0, td, texture, ac, cloth);
}