Sdk/BaseSystem: Fix udpate with max update rate + unit tests

This commit is contained in:
Lynix
2017-09-22 21:01:25 +02:00
parent cc4fdf2476
commit f95fc332f1
8 changed files with 18 additions and 7 deletions

View File

@@ -171,7 +171,7 @@ namespace Ndk
if (m_maxUpdateRate > 0.f)
{
if (m_updateCounter > elapsedTime)
if (m_updateCounter >= m_maxUpdateRate)
{
if (m_fixedUpdateRate > 0.f)
{
@@ -184,7 +184,7 @@ namespace Ndk
else
{
OnUpdate(m_maxUpdateRate);
m_updateCounter -= elapsedTime;
m_updateCounter -= m_maxUpdateRate;
}
}
}