Bug fixes

This commit is contained in:
AbstractConcept 2022-09-26 00:50:26 -05:00
parent 7e1680a7fb
commit 73f7e32e0c
69 changed files with 107 additions and 91 deletions

View file

@ -41,6 +41,8 @@ namespace RimWorldAnimationStudio
int keyframePosition = 0;
keyframes[keyframes.Count - 1].tickDuration = 1;
for (int i = 0; i < keyframes.Count; i++)
{
PawnKeyframe keyframe = keyframes[i];
@ -84,8 +86,6 @@ namespace RimWorldAnimationStudio
keyframePosition += keyframe.tickDuration;
}
}
keyframes[keyframes.Count - 1].tickDuration = 1;
}
public override void ValidateData() { }

View file

@ -34,11 +34,6 @@ namespace RimWorldAnimationStudio
// Sort keyframes by atTick
foreach (PawnAnimationClip clip in animationClips)
{ clip.keyframes = clip.keyframes.OrderBy(x => x.atTick).ToList(); }
// Check if looping
stageWindowSize = stageWindowSize > 0 ? stageWindowSize : animationClips.Select(x => x.duration).Max();
int cycles = Mathf.CeilToInt(playTimeTicks / stageWindowSize);
isLooping = cycles > 1;
}
public bool MakeNew()