MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / RemoveMapChangeTimers

Method RemoveMapChangeTimers

core/TimerSys.cpp:406–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405CStack<ITimer *> s_tokill;
406void TimerSystem::RemoveMapChangeTimers()
407{
408 ITimer *pTimer;
409 TimerIter iter;
410
411 for (iter=m_SingleTimers.begin(); iter!=m_SingleTimers.end(); iter++)
412 {
413 pTimer = (*iter);
414 if (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE)
415 {
416 s_tokill.push(pTimer);
417 }
418 }
419
420 for (iter=m_LoopTimers.begin(); iter!=m_LoopTimers.end(); iter++)
421 {
422 pTimer = (*iter);
423 if (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE)
424 {
425 s_tokill.push(pTimer);
426 }
427 }
428
429 while (!s_tokill.empty())
430 {
431 KillTimer(s_tokill.front());
432 s_tokill.pop();
433 }
434}
435
436IMapTimer *TimerSystem::SetMapTimer(IMapTimer *pTimer)
437{

Callers 1

LevelShutdownMethod · 0.80

Calls 5

emptyMethod · 0.80
popMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected