offset tweaks

This commit is contained in:
Platinum 2020-04-27 20:34:30 -07:00
parent 2ee8975fd0
commit 414cf3dce4
4 changed files with 7 additions and 8 deletions

View file

@ -15,6 +15,6 @@ namespace Rimworld_Animations {
public string gender; public string gender;
public bool isFucking = false; public bool isFucking = false;
public bool isFucked = false; public bool isFucked = false;
public Vector3 offset = new Vector3(0, 0, 0); public Vector3 offset = new Vector2(0, 0);
} }
} }

View file

@ -3,14 +3,13 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using UnityEngine;
namespace Rimworld_Animations { namespace Rimworld_Animations {
public class AlienRaceOffset { public class AlienRaceOffset {
public string defName; public string defName;
public Vector2 offset;
public float x = 0;
public float z = 0;
} }
} }

View file

@ -96,11 +96,11 @@ namespace Rimworld_Animations {
isAnimating = true; 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) { if (raceOffset != null) {
anchor.x += mirror ? offset.x * -1f : offset.x; anchor.x += mirror ? raceOffset.offset.x * -1f : raceOffset.offset.x;
anchor.z += offset.z; anchor.z += raceOffset.offset.y;
} }
pawn.jobs.posture = PawnPosture.Standing; pawn.jobs.posture = PawnPosture.Standing;