Skip to content

Commit

Permalink
Compute timeline value correctly between nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
thojmr committed May 8, 2022
1 parent 4bf69bd commit 8ed77be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PregnancyPlus/PregnancyPlus.Core/PPPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using KKAPI.Maker;
using KKAPI.Chara;
using KKAPI.Utilities;
using UnityEngine;
#if KKS || AI
using KKAPI.MainGame;
#endif
Expand Down Expand Up @@ -73,7 +74,6 @@ internal void Start()
PregnancyPlusGui.InitStudio(hi, this);
PregnancyPlusGui.InitMaker(hi, this);


//Requires KKAPI 1.30+ and Bepinex 5.4.15 to use the timeline interpolable, but its just a soft depencendy for this plugin
try {
//Set up the timeline imterpolable tool
Expand All @@ -85,9 +85,12 @@ internal void Start()
timelineGUID,
"0",
"Pregnancy+",
(oci, ctrl, leftValue, rightValue, factor) => ctrl.MeshInflate(factor * 40, "timeline_interpolable"),
(oci, ctrl, leftValue, rightValue, factor) => {
var inflationSize = Mathf.Lerp(leftValue, rightValue, factor);
ctrl.MeshInflate(inflationSize, "timeline_interpolable");
},
null,
(oci, ctrl) => (int)ctrl.infConfig.inflationSize/40
(oci, ctrl) => (int)ctrl.infConfig.inflationSize
);
}
}
Expand Down

0 comments on commit 8ed77be

Please sign in to comment.