Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetClientTurnManager.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | void CNetClientTurnManager::NotifyFinishedUpdate(u32 turn) | ||||
CSyncCheckMessage msg; | CSyncCheckMessage msg; | ||||
msg.m_Turn = turn; | msg.m_Turn = turn; | ||||
msg.m_Hash = hash; | msg.m_Hash = hash; | ||||
m_NetClient.SendMessage(&msg); | m_NetClient.SendMessage(&msg); | ||||
} | } | ||||
void CNetClientTurnManager::OnDestroyConnection() | void CNetClientTurnManager::OnDestroyConnection() | ||||
{ | { | ||||
if (m_NetClient.GetCurrState() == NCS_INGAME) | |||||
NotifyFinishedOwnCommands(m_CurrentTurn + COMMAND_DELAY); | NotifyFinishedOwnCommands(m_CurrentTurn + COMMAND_DELAY); | ||||
elexis: I suspect that this +2 when not ready yet may even have triggered the `Client %d (%s) is ready… | |||||
} | } | ||||
void CNetClientTurnManager::OnSimulationMessage(CSimulationMessage* msg) | void CNetClientTurnManager::OnSimulationMessage(CSimulationMessage* msg) | ||||
{ | { | ||||
// Command received from the server - store it for later execution | // Command received from the server - store it for later execution | ||||
AddCommand(msg->m_Client, msg->m_Player, msg->m_Data, msg->m_Turn); | AddCommand(msg->m_Client, msg->m_Player, msg->m_Data, msg->m_Turn); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
I suspect that this +2 when not ready yet may even have triggered the Client %d (%s) is ready for turn %d, but expected %d breakpoint in CNetServerTurnManager::NotifyFinishedClientCommands that is reported in #3643 and replaced with a LOGERROR in rP21023 but never understood how it could be triggered.