Skip to content

Commit 78e5baf

Browse files
committed
Fix replicating changes from one client to another
1 parent f773a07 commit 78e5baf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Engine/Networking/NetworkReplicator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ void InvokeObjectReplication(NetworkReplicatedObject& item, uint32 ownerFrame, b
10291029
}
10301030

10311031
// Speed up replication of client-owned objects to other clients from server to reduce lag (data has to go from client to server and then to other clients)
1032-
if (NetworkManager::IsServer())
1032+
if (NetworkManager::IsServer() || NetworkManager::IsHost())
10331033
DirtyObjectImpl(item, obj);
10341034
}
10351035

@@ -2147,7 +2147,7 @@ void NetworkInternal::NetworkReplicatorUpdate()
21472147
Objects.Remove(it);
21482148
continue;
21492149
}
2150-
if (item.Role != NetworkObjectRole::OwnedAuthoritative)
2150+
if (item.Role != NetworkObjectRole::OwnedAuthoritative && NetworkManager::IsClient())
21512151
continue; // Send replication messages of only owned objects or from other client objects
21522152
CachedReplicationResult->AddObject(obj);
21532153
}

0 commit comments

Comments
 (0)