1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

Don't produce NaN's for 0-length controllers in NifOgre::DefaultFunction

This commit is contained in:
scrawl 2014-09-07 23:47:57 +02:00
parent fe0c9ec9b7
commit f3f869e99a

View file

@ -89,6 +89,9 @@ namespace NifOgre
{
if(mDeltaInput)
{
if (mStopTime - mStartTime == 0.f)
return 0.f;
mDeltaCount += value*mFrequency;
if(mDeltaCount < mStartTime)
mDeltaCount = mStopTime - std::fmod(mStartTime - mDeltaCount,