diff options
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
-rw-r--r-- | src/helpers/AnimatedVariable.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 6deeff39..ab5643a6 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -55,11 +55,6 @@ void CBaseAnimatedVariable::registerVar() { m_bIsRegistered = true; } -int CBaseAnimatedVariable::getDurationLeftMs() { - return std::max( - (int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count(), 0); -} - float CBaseAnimatedVariable::getPercent() { const auto DURATIONPASSED = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - animationBegin).count(); return std::clamp((DURATIONPASSED / 100.f) / m_pConfig->pValues->internalSpeed, 0.f, 1.f); |