Ref T232, some (dispatch) timer code was duplicated

* fixed a bug, where a non existing timer was killed
* unified code in base class
This commit is contained in:
Klaus Basan
2018-01-20 07:22:19 +01:00
parent af75c88784
commit dac1ee85f9
6 changed files with 22 additions and 13 deletions

View File

@@ -206,8 +206,12 @@ namespace BlackCore
//! Slow timer used to highlight aircraft, can be used for other things too
virtual void oneSecondTimerTimeout();
//! Kill timer if id is valid
void safeKillTimer();
bool m_pausedSimFreezesInterpolation = false; //!< paused simulator will also pause interpolation (so AI aircraft will hold)
bool m_autoCalcAirportDistance = true; //!< automatically calculate airport distance and bearing
int m_timerId = -1; //!< dispatch timer id
int m_statsUpdateAircraftCountMs = 0; //!< statistics update count
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics update time
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time