MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / AddObject

Method AddObject

Source/Engine/Networking/NetworkReplicationHierarchy.cpp:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void NetworkReplicationNode::AddObject(NetworkReplicationHierarchyObject obj)
51{
52 if (obj.ReplicationFPS > ZeroTolerance) // > 0
53 {
54 // Randomize initial replication update to spread rep rates more evenly for large scenes that register all objects within the same frame
55 obj.ReplicationUpdatesLeft = NetworkReplicationNodeObjectCounter++ % Math::Clamp(Math::RoundToInt(NetworkManager::NetworkFPS / obj.ReplicationFPS), 1, 60);
56 }
57
58 Objects.Add(obj);
59}
60
61bool NetworkReplicationNode::RemoveObject(ScriptingObject* obj)
62{

Callers 1

UpdateMethod · 0.45

Calls 8

ClampFunction · 0.85
RoundToIntFunction · 0.50
MinFunction · 0.50
AddMethod · 0.45
GetActorMethod · 0.45
GetPositionMethod · 0.45
TryGetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected