Merge pull request #1102 from aws-lumberyard-dev/MultiplayerPipeline

Fixed ctrl+g port number
This commit is contained in:
AMZN-puvvadar
2021-06-03 08:50:29 -07:00
committed by GitHub
3 changed files with 5 additions and 3 deletions
@@ -46,7 +46,7 @@ namespace AzNetworking
} }
else if (m_updateRate < updateTimeMs) else if (m_updateRate < updateTimeMs)
{ {
AZLOG_INFO("TimedThread bled %d ms", aznumeric_cast<int32_t>(updateTimeMs - m_updateRate)); AZLOG(NET_TimedThread, "TimedThread bled %d ms", aznumeric_cast<int32_t>(updateTimeMs - m_updateRate));
} }
} }
OnStop(); OnStop();
@@ -140,7 +140,7 @@ namespace Multiplayer
AZ::CVarFixedString remoteAddress; AZ::CVarFixedString remoteAddress;
uint16_t remotePort; uint16_t remotePort;
if (console->GetCvarValue("editorsv_serveraddr", remoteAddress) != AZ::GetValueResult::ConsoleVarNotFound && if (console->GetCvarValue("editorsv_serveraddr", remoteAddress) != AZ::GetValueResult::ConsoleVarNotFound &&
console->GetCvarValue("editorsv_port", remotePort) != AZ::GetValueResult::ConsoleVarNotFound) console->GetCvarValue("sv_port", remotePort) != AZ::GetValueResult::ConsoleVarNotFound)
{ {
// Connect the Editor to the editor server for Multiplayer simulation // Connect the Editor to the editor server for Multiplayer simulation
AZ::Interface<IMultiplayer>::Get()->InitializeMultiplayer(MultiplayerAgentType::Client); AZ::Interface<IMultiplayer>::Get()->InitializeMultiplayer(MultiplayerAgentType::Client);
@@ -149,6 +149,8 @@ namespace Multiplayer
const IpAddress ipAddress(remoteAddress.c_str(), remotePort, networkInterface->GetType()); const IpAddress ipAddress(remoteAddress.c_str(), remotePort, networkInterface->GetType());
networkInterface->Connect(ipAddress); networkInterface->Connect(ipAddress);
AZ::Interface<IMultiplayer>::Get()->SendReadyForEntityUpdates(true);
} }
} }
} }
@@ -165,7 +165,7 @@ namespace Multiplayer
// BeginGameMode and Prefab Processing have completed at this point // BeginGameMode and Prefab Processing have completed at this point
IMultiplayerTools* mpTools = AZ::Interface<IMultiplayerTools>::Get(); IMultiplayerTools* mpTools = AZ::Interface<IMultiplayerTools>::Get();
if (editorsv_enabled && mpTools != nullptr && mpTools->DidProcessNetworkPrefabs()) if (editorsv_enabled && mpTools != nullptr)
{ {
const AZStd::vector<AZ::Data::Asset<AZ::Data::AssetData>>& assetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData(); const AZStd::vector<AZ::Data::Asset<AZ::Data::AssetData>>& assetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData();