diff --git a/1.2/Assemblies/Rimworld-Animations.dll b/1.2/Assemblies/Rimworld-Animations.dll index 316f94d..18ebbf5 100644 Binary files a/1.2/Assemblies/Rimworld-Animations.dll and b/1.2/Assemblies/Rimworld-Animations.dll differ diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 7bae38d..3699a4f 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -36,7 +36,7 @@ False - ..\..\..\..\workshop\content\294100\839005762\1.1\Assemblies\AlienRace.dll + ..\..\..\..\workshop\content\294100\839005762\1.2\Assemblies\AlienRace.dll False @@ -45,7 +45,7 @@ False - ..\RJW\1.2\Assemblies\RJW.dll + ..\rjw-master\1.2\Assemblies\RJW.dll False diff --git a/Source/Patches/HarmonyPatch_AlienRace.cs b/Source/Patches/HarmonyPatch_AlienRace.cs index 9ebfed0..419ac97 100644 --- a/Source/Patches/HarmonyPatch_AlienRace.cs +++ b/Source/Patches/HarmonyPatch_AlienRace.cs @@ -53,8 +53,7 @@ namespace Rimworld_Animations { if (!ba.CanDrawAddon(pawn: pawn)) continue; AlienPartGenerator.RotationOffset offset; - if (ba.drawnInBed) { - + if (ba.drawnInBed || ba.alignWithHead) { offset = pawnAnimator.headFacing == Rot4.South ? ba.offsets.south : pawnAnimator.headFacing == Rot4.North ? @@ -92,7 +91,7 @@ namespace Rimworld_Animations { float moffsetY = ba.inFrontOfBody ? 0.3f + ba.layerOffset : -0.3f - ba.layerOffset; float num = ba.angle; - if ((ba.drawnInBed ? pawnAnimator.headFacing : rotation) == Rot4.North) { + if ((ba.drawnInBed || ba.alignWithHead ? pawnAnimator.headFacing : rotation) == Rot4.North) { moffsetX = 0f; if (ba.layerInvert) moffsetY = -moffsetY; @@ -104,7 +103,7 @@ namespace Rimworld_Animations { moffsetX += bodyOffset.x + crownOffset.x; moffsetZ += bodyOffset.y + crownOffset.y; - if ((ba.drawnInBed ? pawnAnimator.headFacing : rotation) == Rot4.East) { + if ((ba.drawnInBed || ba.alignWithHead ? pawnAnimator.headFacing : rotation) == Rot4.East) { moffsetX = -moffsetX; num = -num; //Angle } @@ -114,7 +113,7 @@ namespace Rimworld_Animations { //Angle calculation to not pick the shortest, taken from Quaternion.Angle and modified //assume drawnInBed means headAddon - if (ba.drawnInBed && pawn.TryGetComp() != null && pawn.TryGetComp().isAnimating) { + if (ba.drawnInBed || ba.alignWithHead && pawn.TryGetComp() != null && pawn.TryGetComp().isAnimating) { Quaternion headQuatInAnimation = Quaternion.AngleAxis(pawnAnimator.headAngle, Vector3.up); Rot4 headRotInAnimation = pawnAnimator.headFacing;