From 0dfc87700d5723e6958dd6021791d897996b2001 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 25 Sep 2026 23:58:42 +0300 Subject: [PATCH] cleanup --- res/modules/animation.lua | 5 +++-- res/modules/internal/formats/vca.lua | 3 +-- res/scripts/components/animator.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/res/modules/animation.lua b/res/modules/animation.lua index 35a77b78e..411623364 100644 --- a/res/modules/animation.lua +++ b/res/modules/animation.lua @@ -48,9 +48,10 @@ local this = { INT_LINEAR = 2, INT_BEZIER = 3, INT_CUSTOM = 4, - ALMOST_HUGE = 1e9, + MAX_DURATION = 1e9, + MAX_FRAMES = 1e9, - TRACE_CODEGEN = true, + TRACE_CODEGEN = false, maths = { bezier_interpolation = bezier_interpolation diff --git a/res/modules/internal/formats/vca.lua b/res/modules/internal/formats/vca.lua index 99f03f15b..4ecf4c895 100644 --- a/res/modules/internal/formats/vca.lua +++ b/res/modules/internal/formats/vca.lua @@ -107,9 +107,8 @@ local function parse_track(root) local line = { axis = node.by and ("xyz"):find(node.by) or "", channel = channel, - period = node.period or animation.ALMOST_HUGE + period = node.period or animation.MAX_FRAMES } - debug.print(animation.ALMOST_HUGE) if node.func then line.expression = node.func elseif node.curve then diff --git a/res/scripts/components/animator.lua b/res/scripts/components/animator.lua index 9fc5735fe..611ffa6f8 100644 --- a/res/scripts/components/animator.lua +++ b/res/scripts/components/animator.lua @@ -1,4 +1,4 @@ -local ALMOST_HUGE = animation.ALMOST_HUGE +local MAX_DURATION = animation.MAX_DURATION local rig = entity.skeleton @@ -54,7 +54,7 @@ local function update(delta) if state.track and intensity > 0.0 then state.track.func( rig, - state.timer % math.min(ALMOST_HUGE, state.track.duration), + state.timer % math.min(MAX_DURATION, state.track.duration), intensity * state.max_intencity ) end