diff --git a/1.3/Assemblies/Rimworld-Animations.dll b/1.3/Assemblies/Rimworld-Animations.dll index 1e48922..43d8f0e 100644 Binary files a/1.3/Assemblies/Rimworld-Animations.dll and b/1.3/Assemblies/Rimworld-Animations.dll differ diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 3eeece9..05627c3 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -108,6 +108,7 @@ + @@ -121,7 +122,6 @@ - diff --git a/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs b/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs index bdbbe9c..c58930d 100644 --- a/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs +++ b/Source/Patches/OtherModPatches/HarmonyPatch_AlienRace.cs @@ -11,6 +11,7 @@ using Verse; using AlienRace; namespace Rimworld_Animations { + [HarmonyPatch(typeof(AlienRace.HarmonyPatches), "DrawAddons")] public static class HarmonyPatch_AlienRace { @@ -71,11 +72,23 @@ namespace Rimworld_Animations { } } + public static bool Prefix(PawnRenderFlags renderFlags, ref Vector3 vector, ref Vector3 headOffset, Pawn pawn, ref Quaternion quat, ref Rot4 rotation) + { + + CompBodyAnimator anim = pawn.TryGetComp(); + if (!renderFlags.FlagSet(PawnRenderFlags.Portrait) && anim.isAnimating) + { + quat = Quaternion.AngleAxis(anim.bodyAngle, Vector3.up); + } + + return true; + + } } [HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")] public static class HarmonyPatch_ResolveApparelGraphics - { + { public static bool Prefix(ref Pawn ___pawn) { @@ -86,4 +99,6 @@ namespace Rimworld_Animations { return true; } } -} \ No newline at end of file +} + +