Merge branch 'openttd'

This commit is contained in:
dP
2024-03-17 01:02:31 +07:00
164 changed files with 9303 additions and 5998 deletions
+7 -1
View File
@@ -521,6 +521,9 @@ static const OptionData _options[] = {
*/
int openttd_main(int argc, char *argv[])
{
_game_session_stats.start_time = std::chrono::steady_clock::now();
_game_session_stats.savegame_size = std::nullopt;
std::string musicdriver;
std::string sounddriver;
std::string videodriver;
@@ -1089,7 +1092,10 @@ void SwitchToMode(SwitchMode new_mode)
if (_game_mode == GM_NORMAL && new_mode != SM_SAVE_GAME) _survey.Transmit(NetworkSurveyHandler::Reason::LEAVE);
/* Keep track when we last switch mode. Used for survey, to know how long someone was in a game. */
if (new_mode != SM_SAVE_GAME) _switch_mode_time = std::chrono::steady_clock::now();
if (new_mode != SM_SAVE_GAME) {
_game_session_stats.start_time = std::chrono::steady_clock::now();
_game_session_stats.savegame_size = std::nullopt;
}
switch (new_mode) {
case SM_EDITOR: // Switch to scenario editor