mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-16 19:25:30 +08:00
Cutscene viewer displaying weapons
This commit is contained in:
@@ -2749,6 +2749,23 @@ namespace CodeWalker.Rendering
|
||||
|
||||
}
|
||||
|
||||
public void RenderWeapon(Weapon weapon, ClipMapEntry animClip = null)
|
||||
{
|
||||
|
||||
YdrFile ydr = gameFileCache.GetYdr(weapon.ModelHash);
|
||||
if (ydr == null)
|
||||
{
|
||||
ydr = gameFileCache.GetYdr(weapon.NameHash);//fallback to low def version?
|
||||
}
|
||||
|
||||
if ((ydr != null) && (ydr.Loaded) && (ydr.Drawable != null))
|
||||
{
|
||||
var d = ydr.Drawable;
|
||||
var txdhash = weapon.NameHash;
|
||||
|
||||
RenderDrawable(d, null, weapon.RenderEntity, txdhash, null, null, animClip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user