Validate some base cases in InitializeMultiplayer
This commit is contained in:
@@ -714,6 +714,17 @@ namespace Multiplayer
|
||||
|
||||
void MultiplayerSystemComponent::InitializeMultiplayer(MultiplayerAgentType multiplayerType)
|
||||
{
|
||||
if (m_agentType == multiplayerType)
|
||||
{
|
||||
// No-op
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_agentType != MultiplayerAgentType::Uninitialized && multiplayerType != MultiplayerAgentType::Uninitialized)
|
||||
{
|
||||
AZLOG_WARN("Attemping to InitializeMultiplayer from one initialized type to another. Your session may not have been properly torn down.");
|
||||
}
|
||||
|
||||
if (m_agentType == MultiplayerAgentType::Uninitialized)
|
||||
{
|
||||
if (multiplayerType == MultiplayerAgentType::ClientServer || multiplayerType == MultiplayerAgentType::DedicatedServer)
|
||||
|
||||
Reference in New Issue
Block a user