mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 22:35:37 +03:00
Fix definitevely time drift on repeating tasks (bug 3302, r=dvander)
This commit is contained in:
parent
4fcf93afb9
commit
28aa4dfbf7
@ -113,7 +113,9 @@ void CTaskMngr::CTask::changeBase(float fNewBase)
|
|||||||
|
|
||||||
void CTaskMngr::CTask::resetNextExecTime(float fCurrentTime)
|
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)
|
void CTaskMngr::CTask::executeIfRequired(float fCurrentTime, float fTimeLimit, float fTimeLeft)
|
||||||
|
Loading…
Reference in New Issue
Block a user