Skip to content

Commit

Permalink
Fix query.life_time
Browse files Browse the repository at this point in the history
  • Loading branch information
bernie-g committed Nov 8, 2023
1 parent 7090a20 commit 8389c76
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ public void registerCustomInstructionListener(ICustomInstructionListener<T> cust
public void process(double tick, AnimationEvent<T> event, List<IBone> modelRendererList,
HashMap<String, Pair<IBone, BoneSnapshot>> boneSnapshotCollection, Evaluator evaluator,
ExecutionContext context, boolean crashWhenCantFindBone) {
context.setVariable("query.life_time", tick / 20);

if (currentAnimation != null) {
IAnimatableModel<T> model = getModel(this.animatable);
Expand All @@ -373,7 +374,6 @@ public void process(double tick, AnimationEvent<T> event, List<IBone> modelRende

double actualTick = tick;
tick = adjustTick(tick);
context.setVariable("query.life_time", tick / 20);

// Transition period has ended, reset the tick and set the animation to running
if (animationState == AnimationState.Transitioning && tick >= transitionLengthTicks) {
Expand Down

0 comments on commit 8389c76

Please sign in to comment.