Initialize members in the class of CNet*

Sometimes the order was wrong.
This commit is contained in:
phosit
2026-03-03 20:00:57 +01:00
parent 96c0d45b14
commit 040e0b29a2
4 changed files with 22 additions and 38 deletions
+1 -6
View File
@@ -67,14 +67,9 @@ constexpr u32 NETWORK_BAD_PING = DEFAULT_TURN_LENGTH * COMMAND_DELAY_MP / 2;
CNetClient *g_NetClient = NULL;
CNetClient::CNetClient(CGame* game, const CStrW& username, const CStr& hostJID) :
m_Session(NULL),
m_UserName{username},
m_HostJID{hostJID},
m_HostID((u32)-1), m_ClientTurnManager(NULL), m_Game(game),
m_LastConnectionCheck(0),
m_ServerAddress(),
m_ServerPort(0),
m_Rejoin(false)
m_Game{game}
{
m_Game->SetTurnManager(NULL); // delete the old local turn manager so we don't accidentally use it