mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
offset tweaks
This commit is contained in:
parent
2ee8975fd0
commit
414cf3dce4
4 changed files with 7 additions and 8 deletions
Binary file not shown.
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue