diff --git a/core/TimerSys.cpp b/core/TimerSys.cpp index 32e6d206..e35de5ec 100644 --- a/core/TimerSys.cpp +++ b/core/TimerSys.cpp @@ -55,7 +55,7 @@ void TimerSystem::OnSourceModAllInitialized() void TimerSystem::OnSourceModLevelChange(const char *mapName) { - MapChange(); + MapChange(true); } void TimerSystem::RunFrame() @@ -208,7 +208,7 @@ void TimerSystem::KillTimer(ITimer *pTimer) } CStack s_tokill; -void TimerSystem::MapChange() +void TimerSystem::MapChange(bool real_mapchange) { ITimer *pTimer; TimerIter iter; @@ -216,7 +216,7 @@ void TimerSystem::MapChange() for (iter=m_SingleTimers.begin(); iter!=m_SingleTimers.end(); iter++) { pTimer = (*iter); - if (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE) + if (real_mapchange && (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE)) { s_tokill.push(pTimer); } else { @@ -227,7 +227,7 @@ void TimerSystem::MapChange() for (iter=m_LoopTimers.begin(); iter!=m_LoopTimers.end(); iter++) { pTimer = (*iter); - if (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE) + if (real_mapchange && (pTimer->m_Flags & TIMER_FLAG_NO_MAPCHANGE)) { s_tokill.push(pTimer); } else { diff --git a/core/TimerSys.h b/core/TimerSys.h index 884bdaf2..0438b8b3 100644 --- a/core/TimerSys.h +++ b/core/TimerSys.h @@ -62,7 +62,7 @@ public: //ITimerSystem void FireTimerOnce(ITimer *pTimer, bool delayExec=false); public: void RunFrame(); - void MapChange(); + void MapChange(bool real_mapchange); private: List m_SingleTimers; List m_LoopTimers; diff --git a/core/sourcemod.cpp b/core/sourcemod.cpp index cd0f54dc..8fd8e83d 100644 --- a/core/sourcemod.cpp +++ b/core/sourcemod.cpp @@ -325,7 +325,7 @@ void StartTickSimulation() void StopTickSimulation() { g_SimTicks.ticking = true; - g_Timers.MapChange(); + g_Timers.MapChange(false); g_StillFrames = 0; g_LastTime = gpGlobals->curtime; }