Merged ctrl+g fixes from MultiplayerEditorFixes
Signed-off-by: pereslav <pereslav@amazon.com>
This commit is contained in:
@@ -187,6 +187,13 @@ namespace AzNetworking
|
||||
connection->Disconnect(disconnectReason, TerminationEndpoint::Local);
|
||||
continue;
|
||||
}
|
||||
|
||||
const ConnectionState connectionState = connection->GetConnectionState();
|
||||
if (connectionState == ConnectionState::Disconnecting || connectionState == ConnectionState::Disconnected)
|
||||
{
|
||||
// Skip packets from disconnected connections
|
||||
continue;
|
||||
}
|
||||
|
||||
int32_t decodedPacketSize = 0;
|
||||
m_decryptBuffer.Resize(m_decryptBuffer.GetCapacity());
|
||||
|
||||
@@ -113,6 +113,12 @@ namespace Multiplayer
|
||||
{
|
||||
console->PerformCommand("disconnect");
|
||||
}
|
||||
|
||||
AZ::Interface<INetworkEntityManager>::Get()->ClearAllEntities();
|
||||
|
||||
// Rebuild the library to clear temporary in-memory spawnable assets
|
||||
AZ::Interface<INetworkSpawnableLibrary>::Get()->BuildSpawnablesList();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -235,7 +241,5 @@ namespace Multiplayer
|
||||
|
||||
void MultiplayerEditorSystemComponent::OnGameEntitiesReset()
|
||||
{
|
||||
// Rebuild the library to clear temporary in-memory spawnable assets
|
||||
AZ::Interface<INetworkSpawnableLibrary>::Get()->BuildSpawnablesList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user