diff --git a/Source/Actors/Actor.cs b/Source/Actors/Actor.cs index 6841006..0afae8c 100644 --- a/Source/Actors/Actor.cs +++ b/Source/Actors/Actor.cs @@ -15,6 +15,6 @@ namespace Rimworld_Animations { public string gender; public bool isFucking = false; public bool isFucked = false; - public Vector3 offset = new Vector3(0, 0, 0); + public Vector3 offset = new Vector2(0, 0); } } diff --git a/Source/Actors/AlienRaceOffset.cs b/Source/Actors/AlienRaceOffset.cs index b11cd61..a5bbe20 100644 --- a/Source/Actors/AlienRaceOffset.cs +++ b/Source/Actors/AlienRaceOffset.cs @@ -3,14 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using UnityEngine; namespace Rimworld_Animations { public class AlienRaceOffset { public string defName; - - public float x = 0; - public float z = 0; + public Vector2 offset; } } diff --git a/Source/Comps/CompBodyAnimator.cs b/Source/Comps/CompBodyAnimator.cs index efa0fc5..c364693 100644 --- a/Source/Comps/CompBodyAnimator.cs +++ b/Source/Comps/CompBodyAnimator.cs @@ -96,11 +96,11 @@ namespace Rimworld_Animations { isAnimating = true; - AlienRaceOffset offset = anim?.actors[actor]?.raceOffsets?.Find(x => x.defName == pawn.def.defName); + AlienRaceOffset raceOffset = anim?.actors[actor]?.raceOffsets?.Find(x => x.defName == pawn.def.defName); - if (offset != null) { - anchor.x += mirror ? offset.x * -1f : offset.x; - anchor.z += offset.z; + if (raceOffset != null) { + anchor.x += mirror ? raceOffset.offset.x * -1f : raceOffset.offset.x; + anchor.z += raceOffset.offset.y; } pawn.jobs.posture = PawnPosture.Standing;