Stop replication if NetworkManager::NetworkFPS < 0

This commit is contained in:
Wiktor Kocielski
2023-08-25 01:41:52 +03:00
parent 50c85aec6d
commit 87e36bcfd5

View File

@@ -1412,9 +1412,9 @@ void NetworkInternal::NetworkReplicatorUpdate()
if (!CachedReplicationResult)
CachedReplicationResult = New<NetworkReplicationHierarchyUpdateResult>();
CachedReplicationResult->Init();
if (!isClient && NetworkManager::Clients.IsEmpty())
if ((!isClient && NetworkManager::Clients.IsEmpty()) || NetworkManager::NetworkFPS < -ZeroTolerance)
{
// No need to update replication when nobody's around
// No need to update replication when nobody's around or when replication is disabled
}
else if (Hierarchy)
{