diff --git a/additions/camoucfg/MouseTrajectories.hpp b/additions/camoucfg/MouseTrajectories.hpp index 67e0e6e..10b6a10 100644 --- a/additions/camoucfg/MouseTrajectories.hpp +++ b/additions/camoucfg/MouseTrajectories.hpp @@ -182,6 +182,13 @@ class HumanizeMouseTrajectory { return 150; } + int32_t getMinTime() const { + if (auto minTime = MaskConfig::GetDouble("humanize:minTime")) { + return static_cast(minTime.value() * 100); + } + return 0; + } + std::vector> tweenPoints( const std::vector>& points) const { assert(isListOfPoints(points) && "List of points not valid"); @@ -196,7 +203,7 @@ class HumanizeMouseTrajectory { // Uses a power scale to keep the speed consistent int targetPoints = std::min( getMaxTime(), - std::max(2, static_cast(std::pow(totalLength, 0.25) * 20))); + std::max(getMinTime() + 2, static_cast(std::pow(totalLength, 0.25) * 20))); std::vector> res; for (int i = 0; i < targetPoints; i++) {