From a491c1dade760bfbf44566113fed93b48acfd290 Mon Sep 17 00:00:00 2001 From: c0ffee Date: Fri, 3 May 2024 20:34:58 -0700 Subject: [PATCH] fixes to bodyangle throwing null ref errors, and prop animation offsets --- 1.5/Assemblies/Rimworld-Animations.dll | Bin 50176 -> 50688 bytes .../Cowgirl/AnimationPropDef_Cowgirl_Xray.xml | 4 ++ .../HarmonyPatch_PawnRenderer.cs | 4 +- ...awnRenderNodeProperties_GraphicVariants.cs | 1 + .../PawnRenderNodeWorker_GraphicVariants.cs | 44 +++++++++++++++++- .../PawnRenderNode_GraphicVariants.cs | 2 +- .../PawnRenderSubWorker_HideWhenAnimating.cs | 14 ------ 7 files changed, 51 insertions(+), 18 deletions(-) diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index 8685c9d799bf17debea5cde6a8ba57471ee84f47..9135a27fb6a046b3e1e82ec9efbba14ef2d7a0e2 100644 GIT binary patch delta 15495 zcmbVz2Y6Iv+V*qGoT4D+ zK`GYfDLF~|klLmxwbO}Ik|Q1*w9DEn`m;)fgt%%*`lCKT4VlWI^y=HybiK9e)#s}o z*XuFQne3@WX6llfBE11)zkUfOpQv_eKeNV5>ihN^Zi7{BNmAb8Dl{%@2jN_O3z03i zjy2(tXxhyo3sF(vvgEK7w<6iR`1Y%v-qQQIQ}mGAn>Ooe#UYM1T11H%9oxOA3MpNWW+Z7 zyvgoljtwCku4{bX=a8fq8b9%`m(pe7Qd&)EHGD(ubVuABY>)B%~xMWJNWF{-FO@xK7%r-(7T*G(?bL6iH>@L~W0w^^4T{sSo<#@CMdSzvzEYG$a5t*5 zh^knNoOP%wpl6iY3z|aN-S*-sBx@pe*ozu!d&AZo!9wKy=2Lx8X{mQ3_am_=Q&!xL zNH1tY8};9n=3;JMDxG5CxxrccsGifR^EH!mTdVo*)9h?=n>=bLo#Wr7Uuab(ozV+g zr+M#!Yi)mktXL!cjKCvWFA{;<>DD%_t^_Y{ zsF1v^6&gxJW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ropOffsetDef_Cowgirl_Xray + + diff --git a/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs b/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs index 6d1e2b8..a013ea7 100644 --- a/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs +++ b/1.5/Source/Patches/RimworldPatches/HarmonyPatch_PawnRenderer.cs @@ -11,12 +11,12 @@ namespace Rimworld_Animations [HarmonyPatch(typeof(PawnRenderer), "BodyAngle")] - public class HarmonyPatch_PawnRenderer2 + public class HarmonyPatch_PawnRenderer { public static bool Prefix(ref Pawn ___pawn, ref float __result) { //stop using cache when animating, for when downed (downed disables cache) - if (___pawn.Drawer.renderer.renderTree.rootNode.AnimationWorker is AnimationWorker_KeyframesExtended) + if (___pawn?.Drawer?.renderer?.renderTree?.rootNode?.AnimationWorker is AnimationWorker_KeyframesExtended) { __result = 0; return false; diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs index bd2213f..1b74ba1 100644 --- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs +++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeProperties_GraphicVariants.cs @@ -10,6 +10,7 @@ namespace Rimworld_Animations public class PawnRenderNodeProperties_GraphicVariants : PawnRenderNodeProperties { + public AnimationOffsetDef propOffsetDef = null; public TexPathVariantsDef texPathVariantsDef = null; public bool absoluteTransform = false; diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs index 1192bb0..4a8b195 100644 --- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs +++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNodeWorker_GraphicVariants.cs @@ -61,9 +61,51 @@ namespace Rimworld_Animations return material; - } + public override Vector3 OffsetFor(PawnRenderNode node, PawnDrawParms parms, out Vector3 pivot) + { + Vector3 regularOffsets = base.OffsetFor(node, parms, out pivot); + if ((node.Props as PawnRenderNodeProperties_GraphicVariants)?.propOffsetDef?.offsets is List offsets) + { + foreach (BaseAnimationOffset offset in offsets) + { + if (offset.appliesToPawn(node.tree.pawn)) + { + //modify offset of prop for animationOffset position + regularOffsets += offset.getOffset(node.tree.pawn) ?? Vector3.zero; + return regularOffsets; + + } + } + } + + //unmodified; no offsets found + return regularOffsets; + } + + public override Quaternion RotationFor(PawnRenderNode node, PawnDrawParms parms) + { + Quaternion rotation = base.RotationFor(node, parms); + + if ((node.Props as PawnRenderNodeProperties_GraphicVariants)?.propOffsetDef?.offsets is List offsets) + { + foreach (BaseAnimationOffset offset in offsets) + { + if (offset.appliesToPawn(node.tree.pawn)) + { + //modify offset of prop for animationOffset rotation + rotation *= Quaternion.AngleAxis(offset.getRotation(node.tree.pawn) ?? 0, Vector3.up); + return rotation; + + } + } + } + + //unmodified; no rotation offsets found + return rotation; + + } } } diff --git a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs index 3dd665c..7b625b4 100644 --- a/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs +++ b/1.5/Source/PawnRenderNode/GraphicVariants/PawnRenderNode_GraphicVariants.cs @@ -41,7 +41,7 @@ namespace Rimworld_Animations return GenerateVariants(pawn, props.texPathVariantsDef); - } + } protected override void EnsureMaterialsInitialized() { diff --git a/1.5/Source/RenderSubWorkers/PawnRenderSubWorker_HideWhenAnimating.cs b/1.5/Source/RenderSubWorkers/PawnRenderSubWorker_HideWhenAnimating.cs index 002dffc..2656a1e 100644 --- a/1.5/Source/RenderSubWorkers/PawnRenderSubWorker_HideWhenAnimating.cs +++ b/1.5/Source/RenderSubWorkers/PawnRenderSubWorker_HideWhenAnimating.cs @@ -10,20 +10,6 @@ namespace Rimworld_Animations { public class PawnRenderSubWorker_HideWhenAnimating : PawnRenderSubWorker { - /* hides the entire head node don't use unless you want to do that - public override bool CanDrawNowSub(PawnRenderNode node, PawnDrawParms parms) - { - - if (node.tree.rootNode.AnimationWorker is AnimationWorker_KeyframesExtended - || node.tree.rootNode.children.Any(x => x.AnimationWorker is AnimationWorker_KeyframesExtended)) - { - return false; - - } - - return base.CanDrawNowSub(node, parms); - } - */ public override void EditMaterial(PawnRenderNode node, PawnDrawParms parms, ref Material material) {