mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Merge branch 'clampunclamped' into 'master'
Manually clamp controller time (#7523) Closes #7523 See merge request OpenMW/openmw!3713
This commit is contained in:
commit
459aa69b87
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user