From aacb6a18db590d5310062fdf280a79448ae8855e Mon Sep 17 00:00:00 2001 From: kberg-amzn Date: Tue, 21 Sep 2021 19:41:23 -0700 Subject: [PATCH] Hook up the last client inputId to the migrate notification Signed-off-by: kberg-amzn --- Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index dbc93834e8..df88af5296 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -611,13 +611,13 @@ namespace Multiplayer } // Store the temporary user identifier so we can transmit it with our next Connect packet - // The new server will use this to reattach our set of autonomous entities + // The new server will use this to re-attach our set of autonomous entities // Disconnect our existing server connection auto visitor = [](IConnection& connection) { connection.Disconnect(DisconnectReason::ClientMigrated, TerminationEndpoint::Local); }; m_networkInterface->GetConnectionSet().VisitConnections(visitor); AZLOG_INFO("Migrating to new server shard"); - m_clientMigrationStartEvent.Signal(ClientInputId{ 0 }); + m_clientMigrationStartEvent.Signal(packet.GetLastClientInputId()); m_networkInterface->Connect(packet.GetRemoteServerAddress()); return true; }