play fast anim for quickie -- enable in options

This commit is contained in:
Platinum 2020-05-05 13:31:42 -07:00
parent 1509e9fff6
commit d3db12f744
4 changed files with 18 additions and 12 deletions

View file

@ -94,7 +94,7 @@ namespace Rimworld_Animations {
anchor = thing.Position.ToVector3Shifted();
}
}
public void StartAnimation(AnimationDef anim, int actor, bool mirror = false, bool shiver = false) {
public void StartAnimation(AnimationDef anim, int actor, bool mirror = false, bool shiver = false, bool fastAnimForQuickie = false) {
isAnimating = true;
@ -111,7 +111,7 @@ namespace Rimworld_Animations {
this.anim = anim;
this.mirror = mirror;
curStage = 0;
curStage = fastAnimForQuickie ? 1 : 0;
animTicks = 0;
stageTicks = 0;
clipTicks = 0;
@ -180,11 +180,15 @@ namespace Rimworld_Animations {
clipPercent = 0;
}
if(curStage >= anim.animationStages.Count && animTicks < anim.animationTimeTicks && pawn.jobs.curDriver is JobDriver_SexBaseInitiator) {
if(curStage >= anim.animationStages.Count) {
isAnimating = false;
pawn.jobs.curDriver.ReadyForNextToil();
} else {
tickClip();
}
tickClip();
}