Fix positional desync of network objects plus related log spam

Signed-off-by: puvvadar <puvvadar@amazon.com>
This commit is contained in:
puvvadar
2021-07-12 11:15:38 -07:00
parent e7b44b7d6b
commit a48a0d1f8a
5 changed files with 31 additions and 14 deletions
@@ -178,6 +178,18 @@ namespace Multiplayer
void MultiplayerEditorConnection::OnDisconnect([[maybe_unused]] AzNetworking::IConnection* connection, [[maybe_unused]] DisconnectReason reason, [[maybe_unused]] TerminationEndpoint endpoint)
{
;
bool editorLaunch = false;
if (auto console = AZ::Interface<AZ::IConsole>::Get(); console)
{
console->GetCvarValue("editorsv_launch", editorLaunch);
}
if (editorsv_isDedicated && editorLaunch && m_networkEditorInterface->GetConnectionSet().GetConnectionCount() == 1)
{
if (m_networkEditorInterface->GetPort() != 0)
{
m_networkEditorInterface->StopListening();
}
}
}
}