diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-13 17:25:58 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-06-13 17:25:58 +0200 |
commit | 7cf88118885699a23daa4768285d512fc06d5a2a (patch) | |
tree | a054df58b5a3bf1ed7b2231d03fe52df1119aff1 /src/app/app.cpp | |
parent | e8e220085a73e470bf29aa47e63e19d427913962 (diff) | |
download | colobot-7cf88118885699a23daa4768285d512fc06d5a2a.tar.gz colobot-7cf88118885699a23daa4768285d512fc06d5a2a.tar.bz2 colobot-7cf88118885699a23daa4768285d512fc06d5a2a.zip |
Fix for #195
* loading time now is not counted in elapsed time
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r-- | src/app/app.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 932e61e..7acef31 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1264,13 +1264,24 @@ void CApplication::SuspendSimulation() void CApplication::ResumeSimulation() { m_simulationSuspended = false; + InternalResumeSimulation(); + GetLogger()->Info("Resume simulation\n"); +} + +void CApplication::ResetTimeAfterLoading() +{ + InternalResumeSimulation(); + + GetLogger()->Trace("Resume simulation on loading\n"); +} + +void CApplication::InternalResumeSimulation() +{ GetSystemUtils()->GetCurrentTimeStamp(m_baseTimeStamp); GetSystemUtils()->CopyTimeStamp(m_curTimeStamp, m_baseTimeStamp); m_realAbsTimeBase = m_realAbsTime; m_absTimeBase = m_exactAbsTime; - - GetLogger()->Info("Resume simulation\n"); } bool CApplication::GetSimulationSuspended() const |