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 bool isFucking = 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.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;
}
}

View File

@ -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;