mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-29 10:22:53 +08:00
Cutscene viewer props using bone animations
This commit is contained in:
parent
7e240682d0
commit
96d34ec154
@ -2403,7 +2403,7 @@ namespace CodeWalker.Rendering
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool RenderArchetype(Archetype arche, YmapEntityDef entity, Renderable rndbl = null, bool cull = true)
|
||||
public bool RenderArchetype(Archetype arche, YmapEntityDef entity, Renderable rndbl = null, bool cull = true, ClipMapEntry animClip = null)
|
||||
{
|
||||
//enqueue a single archetype for rendering.
|
||||
|
||||
@ -2472,6 +2472,14 @@ namespace CodeWalker.Rendering
|
||||
|
||||
if (rndbl != null)
|
||||
{
|
||||
if (animClip != null)
|
||||
{
|
||||
rndbl.ClipMapEntry = animClip;
|
||||
rndbl.ClipDict = animClip.Clip?.Ycd;
|
||||
rndbl.HasAnims = true;
|
||||
}
|
||||
|
||||
|
||||
res = RenderRenderable(rndbl, arche, entity);
|
||||
|
||||
|
||||
|
@ -503,6 +503,7 @@ namespace CodeWalker.World
|
||||
}
|
||||
obj.Prop.Position = pos;
|
||||
obj.Prop.Orientation = rot;
|
||||
obj.AnimClip = cme;
|
||||
}
|
||||
|
||||
}
|
||||
@ -530,7 +531,7 @@ namespace CodeWalker.World
|
||||
}
|
||||
if (obj.Prop != null)
|
||||
{
|
||||
renderer.RenderArchetype(obj.Prop.Archetype, obj.Prop);
|
||||
renderer.RenderArchetype(obj.Prop.Archetype, obj.Prop, null, true, obj.AnimClip);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -993,6 +994,7 @@ namespace CodeWalker.World
|
||||
|
||||
public YmapEntityDef Prop { get; set; }
|
||||
|
||||
public ClipMapEntry AnimClip { get; set; }
|
||||
|
||||
|
||||
public void Init(CutObject obj, GameFileCache gfc)
|
||||
|
Loading…
Reference in New Issue
Block a user