forked from teamnwah/openmw-tes3coop
Don't produce NaN's for 0-length controllers in NifOgre::DefaultFunction
This commit is contained in:
parent
fe0c9ec9b7
commit
f3f869e99a
1 changed files with 3 additions and 0 deletions
|
@ -89,6 +89,9 @@ namespace NifOgre
|
||||||
{
|
{
|
||||||
if(mDeltaInput)
|
if(mDeltaInput)
|
||||||
{
|
{
|
||||||
|
if (mStopTime - mStartTime == 0.f)
|
||||||
|
return 0.f;
|
||||||
|
|
||||||
mDeltaCount += value*mFrequency;
|
mDeltaCount += value*mFrequency;
|
||||||
if(mDeltaCount < mStartTime)
|
if(mDeltaCount < mStartTime)
|
||||||
mDeltaCount = mStopTime - std::fmod(mStartTime - mDeltaCount,
|
mDeltaCount = mStopTime - std::fmod(mStartTime - mDeltaCount,
|
||||||
|
|
Loading…
Reference in a new issue