diff --git a/components/nifosg/controller.cpp b/components/nifosg/controller.cpp index 54e9e2bb16..f480152a73 100644 --- a/components/nifosg/controller.cpp +++ b/components/nifosg/controller.cpp @@ -57,7 +57,13 @@ namespace NifOsg } case Nif::NiTimeController::ExtrapolationMode::Constant: default: - return std::clamp(time, mStartTime, mStopTime); + { + if (time < mStartTime) + return mStartTime; + if (time > mStopTime) + return mStopTime; + return time; + } } }