core/TimerSys.cpp
changeset 1409 84e9d3494603
parent 1408 2fd63cc4bd9c
child 1410 8feec8371000
     1.1 --- a/core/TimerSys.cpp	Tue Sep 11 18:08:49 2007 +0000
     1.2 +++ b/core/TimerSys.cpp	Tue Sep 11 18:16:25 2007 +0000
     1.3 @@ -158,6 +158,12 @@
     1.4  	TimerIter iter;
     1.5  	float to_exec = GetSimulatedTime() + fInterval;
     1.6  
     1.7 +	if ((flags & TIMER_FLAG_BEFORE_MAP_END)
     1.8 +		&& m_fnTimeLeft == NULL)
     1.9 +	{
    1.10 +		return NULL;
    1.11 +	}
    1.12 +
    1.13  	if (m_FreeTimers.empty())
    1.14  	{
    1.15  		pTimer = new ITimer;
    1.16 @@ -253,8 +259,6 @@
    1.17  
    1.18  void TimerSystem::KillTimer(ITimer *pTimer)
    1.19  {
    1.20 -	TimerList *pList;
    1.21 -
    1.22  	if (pTimer->m_KillMe)
    1.23  	{
    1.24  		return;
    1.25 @@ -278,7 +282,6 @@
    1.26  		m_SingleTimers.remove(pTimer);
    1.27  	}
    1.28  
    1.29 -	pList->remove(pTimer);
    1.30  	m_FreeTimers.push(pTimer);
    1.31  }
    1.32