mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-18 09:45:06 +08:00
Ped clothes not exploding
This commit is contained in:
+10
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user