diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index 3c23703..e80e0c8 100644 Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ diff --git a/1.5/Defs/AnimationDefs/TestAnimation2.xml b/1.5/Defs/AnimationDefs/TestAnimation2.xml index 8125f0c..abda22f 100644 --- a/1.5/Defs/AnimationDefs/TestAnimation2.xml +++ b/1.5/Defs/AnimationDefs/TestAnimation2.xml @@ -2,7 +2,7 @@ TestAnimation2 - 120 + 400 False False @@ -13,32 +13,35 @@ Rimworld_Animations.AnimationWorker_KeyframesExtended
  • - (1, 0, 0) 0 0 - North + South
  • - (0, 0, 0) - 30 - 15 - North + 100 + 45 + South
  • - (-1, 0, 0) - 60 + 0 + (-0.73, 0, -0.02) 0 - North + East
  • - (0, 0, 0) - 90 - -15 - North + 200 + 90 + South +
  • +
  • + 300 + 135 + South
  • +
    diff --git a/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml b/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml index ea2061e..05c541b 100644 --- a/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml +++ b/1.5/Defs/GroupAnimationDefs/TestGroupAnimation1.xml @@ -10,16 +10,16 @@
  • 3 -
  • TestAnimation3
  • -
  • TestAnimation3
  • +
  • TestAnimation2
  • +
  • TestAnimation2
  • 1 -
  • TestAnimation3
  • -
  • TestAnimation3
  • +
  • TestAnimation2
  • +
  • TestAnimation2
  • diff --git a/1.5/Source/PawnRenderNode/GraphicBodyTypeVariants/PawnRenderNode_GraphicBodyTypeVariants.cs b/1.5/Source/PawnRenderNode/GraphicBodyTypeVariants/PawnRenderNode_GraphicBodyTypeVariants.cs index 6164782..9972f1c 100644 --- a/1.5/Source/PawnRenderNode/GraphicBodyTypeVariants/PawnRenderNode_GraphicBodyTypeVariants.cs +++ b/1.5/Source/PawnRenderNode/GraphicBodyTypeVariants/PawnRenderNode_GraphicBodyTypeVariants.cs @@ -49,7 +49,6 @@ namespace Rimworld_Animations protected override void EnsureMaterialsInitialized() { variants = GraphicVariantsFor(this.tree.pawn); - base.EnsureMaterialsInitialized(); } diff --git a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs b/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs index e73b1cc..5c11474 100644 --- a/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs +++ b/1.5/Source/PawnRenderNode/GraphicHediffVariants/PawnRenderNode_GraphicHediffVariants.cs @@ -36,10 +36,10 @@ namespace Rimworld_Animations foreach (HediffDef hediffDef in texPathVariant_Hediff.hediffs) { //if the pawn has that hediff, - if (pawn.health.hediffSet.hediffs.Any((Hediff hediff) => hediff.def == hediffDef)) + if (pawn?.health?.hediffSet?.hediffs is List pawnHediffs && pawnHediffs.Any((Hediff hediff) => hediff.def == hediffDef)) { //return that specific variant - curHediff = hediff.def; + curHediff = hediffDef; return GenerateVariants(pawn, texPathVariant_Hediff.texPathVariantsDef); } @@ -56,18 +56,13 @@ namespace Rimworld_Animations protected override void EnsureMaterialsInitialized() { //if pawn no longer has the hediff, - if (curHediff == null || + if (variants == null || (this.tree.pawn.health?.hediffSet?.hediffs is List hediffs && hediffs.Any((Hediff hediff) => hediff.def == curHediff))) { //redo graphicvariantsfor variants = GraphicVariantsFor(this.tree.pawn); } - - base.EnsureMaterialsInitialized(); } - - } - }