Fix definitevely time drift on repeating tasks (bug 3302, r=dvander)

This commit is contained in:
Nextra 2013-07-01 22:58:56 +02:00
parent 4fcf93afb9
commit 28aa4dfbf7

View File

@ -112,8 +112,10 @@ void CTaskMngr::CTask::changeBase(float fNewBase)
}
void CTaskMngr::CTask::resetNextExecTime(float fCurrentTime)
{
m_fNextExecTime = fCurrentTime + m_fBase;
{
// If we're here while we're executing we would add m_fBase twice
if (!m_bInExecute)
m_fNextExecTime = fCurrentTime + m_fBase;
}
void CTaskMngr::CTask::executeIfRequired(float fCurrentTime, float fTimeLimit, float fTimeLeft)