Some cleanup around handling of migrations to simplify interfaces and add additional hooks for functionality
Signed-off-by: kberg-amzn <karlberg@amazon.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <ConnectionData/ClientToServerConnectionData.h>
|
||||
#include <ConnectionData/ServerToClientConnectionData.h>
|
||||
#include <EntityDomains/FullOwnershipEntityDomain.h>
|
||||
#include <EntityDomains/NullEntityDomain.h>
|
||||
#include <ReplicationWindows/NullReplicationWindow.h>
|
||||
#include <ReplicationWindows/ServerToClientReplicationWindow.h>
|
||||
#include <Source/AutoGen/AutoComponentTypes.h>
|
||||
@@ -832,18 +833,21 @@ namespace Multiplayer
|
||||
if (multiplayerType == MultiplayerAgentType::ClientServer || multiplayerType == MultiplayerAgentType::DedicatedServer)
|
||||
{
|
||||
m_spawnNetboundEntities = true;
|
||||
m_initEvent.Signal(m_networkInterface);
|
||||
|
||||
m_initEvent.Signal(m_networkInterface); //< Note! This might initialize our network entity manager for us
|
||||
if (!m_networkEntityManager.IsInitialized())
|
||||
{
|
||||
// Set up a full ownership domain if we didn't construct a domain during the initialize event
|
||||
const AZ::CVarFixedString serverAddr = cl_serveraddr;
|
||||
const uint16_t serverPort = cl_serverport;
|
||||
const AzNetworking::ProtocolType serverProtocol = sv_protocol;
|
||||
const AzNetworking::IpAddress hostId = AzNetworking::IpAddress(serverAddr.c_str(), serverPort, serverProtocol);
|
||||
// Set up a full ownership domain if we didn't construct a domain during the initialize event
|
||||
m_networkEntityManager.Initialize(hostId, AZStd::make_unique<FullOwnershipEntityDomain>());
|
||||
}
|
||||
}
|
||||
else if (multiplayerType == MultiplayerAgentType::Client)
|
||||
{
|
||||
m_networkEntityManager.Initialize(AzNetworking::IpAddress(), AZStd::make_unique<NullEntityDomain>());
|
||||
}
|
||||
}
|
||||
m_agentType = multiplayerType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user