Fix replication regression from eb2fc0f02f
This commit is contained in:
@@ -1436,10 +1436,9 @@ void NetworkInternal::NetworkReplicatorUpdate()
|
||||
// Skip serialization of objects that none will receive
|
||||
if (!isClient)
|
||||
{
|
||||
// TODO: per-object relevancy for connected clients (eg. skip replicating actor to far players)
|
||||
BuildCachedTargets(item, e.TargetClients);
|
||||
if (CachedTargets.Count() == 0)
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item.AsNetworkObject)
|
||||
@@ -1451,11 +1450,10 @@ void NetworkInternal::NetworkReplicatorUpdate()
|
||||
if (failed)
|
||||
{
|
||||
//NETWORK_REPLICATOR_LOG(Error, "[NetworkReplicator] Cannot serialize object {} of type {} (missing serialization logic)", item.ToString(), obj->GetType().ToString());
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Send object to clients
|
||||
{
|
||||
const uint32 size = stream->GetPosition();
|
||||
ASSERT(size <= MAX_uint16)
|
||||
NetworkMessageObjectReplicate msgData;
|
||||
@@ -1520,7 +1518,6 @@ void NetworkInternal::NetworkReplicatorUpdate()
|
||||
// TODO: stats for bytes send per object type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Invoke RPCs
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user