Hook up the last client inputId to the migrate notification

Signed-off-by: kberg-amzn <karlberg@amazon.com>
This commit is contained in:
kberg-amzn
2021-09-21 19:41:23 -07:00
parent e8aeb9b101
commit aacb6a18db
@@ -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;
}