Patches for downed pawns with anims not playing + pawn downed wiggler interfering with anims
This commit is contained in:
parent
8a93f3b087
commit
6d174dbce4
Binary file not shown.
|
@ -15,6 +15,11 @@ namespace Rimworld_Animations
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool Enabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public override Vector3 OffsetAtTick(int tick, PawnDrawParms parms)
|
public override Vector3 OffsetAtTick(int tick, PawnDrawParms parms)
|
||||||
{
|
{
|
||||||
//Todo: Use this for bodyoffsets
|
//Todo: Use this for bodyoffsets
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace Rimworld_Animations
|
||||||
|
{
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(PawnRenderer), "BodyAngle")]
|
||||||
|
|
||||||
|
public class HarmonyPatch_PawnRenderer2
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
__result = 0;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
|
@ -104,6 +104,7 @@
|
||||||
<Compile Include="1.5\Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
|
<Compile Include="1.5\Source\MainTabWindows\OffsetMainButtonDefOf.cs" />
|
||||||
<Compile Include="1.5\Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
|
<Compile Include="1.5\Source\MainTabWindows\WorldComponent_UpdateMainTab.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\Harmony_PatchAll.cs" />
|
<Compile Include="1.5\Source\Patches\Harmony_PatchAll.cs" />
|
||||||
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderer.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNode.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNode.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNodeWorker.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderNodeWorker.cs" />
|
||||||
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderTree.cs" />
|
<Compile Include="1.5\Source\Patches\RimworldPatches\HarmonyPatch_PawnRenderTree.cs" />
|
||||||
|
|
Loading…
Reference in New Issue