fixed amb658 - timer_flag_no_mapchange conflicted with simulated ticking

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401148
This commit is contained in:
David Anderson 2007-07-22 16:01:01 +00:00
parent 1a65cc5934
commit ee6f4cb1fa
3 changed files with 6 additions and 6 deletions

View File

@ -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<ITimer *> 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 {

View File

@ -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<ITimer *> m_SingleTimers;
List<ITimer *> m_LoopTimers;

View File

@ -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;
}