Network cleanup.

Only send the network-warnings to clients that successfully joined the
gamesetup or game.
Thus save a bit performance and
prevents a rare, harmless FSM update error (like in refs #3199) in case
a client received the message while authenticating.
Reported by fatherbushido, refs #3264.

This was SVN commit r18117.
This commit is contained in:
elexis 2016-05-01 10:33:51 +00:00
parent 3bb1058950
commit 462540585b

View File

@ -600,8 +600,14 @@ void CNetServerWorker::CheckClientConnections()
// (since that will show the locally triggered warning instead)
if (message)
for (size_t j = 0; j < m_Sessions.size(); ++j)
if (i != j)
{
if (i != j && (
m_Sessions[j]->GetCurrState() == NSS_PREGAME ||
m_Sessions[j]->GetCurrState() == NSS_INGAME))
{
m_Sessions[j]->SendMessage(message);
}
}
SAFE_DELETE(message);
}