From ea4f117579aafb14267020068bcbfb6edd6143b9 Mon Sep 17 00:00:00 2001 From: Tyler Trahan Date: Sun, 21 Jan 2024 12:44:27 -0500 Subject: [PATCH] Codechange: Use economy date for network join date handling --- src/network/network_base.h | 4 ++-- src/network/network_server.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/network_base.h b/src/network/network_base.h index 3557cb45e4..0b717163f7 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -14,7 +14,7 @@ #include "core/address.h" #include "../core/pool_type.hpp" #include "../company_type.h" -#include "../timer/timer_game_calendar.h" +#include "../timer/timer_game_economy.h" /** Type for the pool with client information. */ typedef Pool NetworkClientInfoPool; @@ -25,7 +25,7 @@ struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_p ClientID client_id; ///< Client identifier (same as ClientState->client_id) std::string client_name; ///< Name of the client CompanyID client_playas; ///< As which company is this client playing (CompanyID) - TimerGameCalendar::Date join_date; ///< Gamedate the client has joined + TimerGameEconomy::Date join_date; ///< Gamedate the client has joined /** * Create a new client. diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 28d40e5cca..121223a4cf 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -883,7 +883,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(Packet *p) assert(NetworkClientInfo::CanAllocateItem()); NetworkClientInfo *ci = new NetworkClientInfo(this->client_id); this->SetInfo(ci); - ci->join_date = TimerGameCalendar::date; + ci->join_date = TimerGameEconomy::date; ci->client_name = client_name; ci->client_playas = playas; Debug(desync, 1, "client: {:08x}; {:02x}; {:02x}; {:02x}", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)ci->client_playas, (int)ci->index);