parent
e8e220085a
commit
7cf8811888
|
@ -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
|
||||
|
|
|
@ -234,6 +234,9 @@ public:
|
|||
//! Returns whether simulation is suspended
|
||||
bool GetSimulationSuspended() const;
|
||||
|
||||
//! Resets time counters to account for time spent loading game
|
||||
void ResetTimeAfterLoading();
|
||||
|
||||
//@{
|
||||
//! Management of simulation speed
|
||||
void SetSimulationSpeed(float speed);
|
||||
|
@ -368,6 +371,9 @@ protected:
|
|||
//! Closes the joystick device
|
||||
void CloseJoystick();
|
||||
|
||||
//! Internal procedure to reset time counters
|
||||
void InternalResumeSimulation();
|
||||
|
||||
//! Resets all performance counters to zero
|
||||
void ResetPerformanceCounters();
|
||||
//! Updates performance counters from gathered timer data
|
||||
|
|
|
@ -1196,6 +1196,8 @@ void CRobotMain::ChangePhase(Phase phase)
|
|||
if (m_mapImage)
|
||||
m_map->SetFixImage(m_mapFilename);
|
||||
|
||||
m_app->ResetTimeAfterLoading();
|
||||
|
||||
/*Math::Point ddim;
|
||||
|
||||
pos.x = 620.0f/640.0f;
|
||||
|
|
Loading…
Reference in New Issue