mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
genital rotation, requires special ver. of RimNudeWorld. Enable in options
This commit is contained in:
parent
89d93091b0
commit
1707afaa4d
9 changed files with 69 additions and 25 deletions
|
@ -43,9 +43,11 @@ namespace Rimworld_Animations {
|
|||
private float clipPercent = 0;
|
||||
|
||||
public Vector3 anchor, deltaPos, headBob;
|
||||
public float bodyAngle, headAngle;
|
||||
public float bodyAngle, headAngle, genitalAngle;
|
||||
public Rot4 headFacing, bodyFacing;
|
||||
|
||||
public bool controlGenitalAngle = false;
|
||||
|
||||
private AnimationDef anim;
|
||||
private AnimationStage stage => anim.animationStages[curStage];
|
||||
private PawnAnimationClip clip => (PawnAnimationClip)stage.animationClips[actor];
|
||||
|
@ -117,6 +119,8 @@ namespace Rimworld_Animations {
|
|||
quiver = false;
|
||||
this.shiver = shiver && AnimationSettings.rapeShiver;
|
||||
|
||||
controlGenitalAngle = anim.actors[actor].controlGenitalAngle;
|
||||
|
||||
//tick once for initialization
|
||||
tickAnim();
|
||||
|
||||
|
@ -218,6 +222,11 @@ namespace Rimworld_Animations {
|
|||
if (headAngle < 0) headAngle = 360 - ((-1f * headAngle) % 360);
|
||||
if (headAngle > 360) headAngle %= 360;
|
||||
|
||||
if (controlGenitalAngle) {
|
||||
genitalAngle = clip.GenitalAngle.Evaluate(clipPercent) * (mirror ? -1 : 1);
|
||||
if (genitalAngle < 0) genitalAngle = 360 - ((-1f * genitalAngle) % 360);
|
||||
if (genitalAngle > 360) genitalAngle %= 360;
|
||||
}
|
||||
|
||||
bodyFacing = mirror ? new Rot4((int)clip.BodyFacing.Evaluate(clipPercent)).Opposite : new Rot4((int)clip.BodyFacing.Evaluate(clipPercent));
|
||||
|
||||
|
@ -231,6 +240,7 @@ namespace Rimworld_Animations {
|
|||
headFacing = headFacing.Opposite;
|
||||
}
|
||||
headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent));
|
||||
|
||||
}
|
||||
|
||||
public Vector3 getPawnHeadPosition() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue