better fix for NALS facial anims; no more artifacting

This commit is contained in:
c0ffee 2024-05-04 13:09:56 -07:00
parent 0f6a37d83b
commit bc283ec08e
3 changed files with 11 additions and 1 deletions

View file

@ -71,8 +71,10 @@ namespace Rimworld_Animations
{ {
foreach (BaseAnimationOffset offset in offsets) foreach (BaseAnimationOffset offset in offsets)
{ {
if (offset.appliesToPawn(node.tree.pawn)) if (offset.appliesToPawn(node.tree.pawn))
{ {
//modify offset of prop for animationOffset position //modify offset of prop for animationOffset position
regularOffsets += offset.getOffset(node.tree.pawn) ?? Vector3.zero; regularOffsets += offset.getOffset(node.tree.pawn) ?? Vector3.zero;
return regularOffsets; return regularOffsets;

View file

@ -1,4 +1,5 @@
using System; using RimWorld;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -17,9 +18,16 @@ namespace Rimworld_Animations
|| node.tree.rootNode.children.Any(x => x.AnimationWorker is AnimationWorker_KeyframesExtended)) || node.tree.rootNode.children.Any(x => x.AnimationWorker is AnimationWorker_KeyframesExtended))
{ {
material.color = Color.clear; material.color = Color.clear;
material.shader = ShaderTypeDefOf.Transparent.Shader;
} }
} }
public override void TransformLayer(PawnRenderNode node, PawnDrawParms parms, ref float layer)
{
base.TransformLayer(node, parms, ref layer);
layer -= 1000;
}
} }
} }