Setting owning connection id based on the hierarchy root network entity.
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
This commit is contained in:
+6
-4
@@ -58,11 +58,10 @@ namespace Multiplayer
|
||||
void BindNetworkHierarchyLeaveEventHandler(NetworkHierarchyLeaveEvent::Handler& handler) override;
|
||||
//! @}
|
||||
|
||||
protected:
|
||||
//! Used by @NetworkHierarchyRootComponent
|
||||
void SetTopLevelHierarchyRootEntity(AZ::Entity* hierarchyRoot);
|
||||
|
||||
private:
|
||||
//! Used by @NetworkHierarchyRootComponent
|
||||
void SetTopLevelHierarchyRootEntity(AZ::Entity* previousHierarchyRoot, AZ::Entity* newHierarchyRoot);
|
||||
|
||||
AZ::ChildChangedEvent::Handler m_childChangedHandler;
|
||||
|
||||
void OnChildChanged(AZ::ChildChangeType type, AZ::EntityId child);
|
||||
@@ -80,5 +79,8 @@ namespace Multiplayer
|
||||
bool m_isHierarchyEnabled = true;
|
||||
|
||||
void NotifyChildrenHierarchyDisbanded();
|
||||
|
||||
AzNetworking::ConnectionId m_previousOwningConnectionId = AzNetworking::InvalidConnectionId;
|
||||
void SetOwningConnectionId(AzNetworking::ConnectionId connectionId) override;
|
||||
};
|
||||
}
|
||||
|
||||
+7
-5
@@ -61,10 +61,9 @@ namespace Multiplayer
|
||||
|
||||
bool SerializeEntityCorrection(AzNetworking::ISerializer& serializer);
|
||||
|
||||
protected:
|
||||
void SetTopLevelHierarchyRootEntity(AZ::Entity* hierarchyRoot);
|
||||
|
||||
private:
|
||||
void SetTopLevelHierarchyRootEntity(AZ::Entity* previousHierarchyRoot, AZ::Entity* newHierarchyRoot);
|
||||
|
||||
AZ::ChildChangedEvent::Handler m_childChangedHandler;
|
||||
AZ::ParentChangedEvent::Handler m_parentChangedHandler;
|
||||
|
||||
@@ -81,16 +80,19 @@ namespace Multiplayer
|
||||
|
||||
//! Rebuilds hierarchy starting from this root component's entity.
|
||||
void RebuildHierarchy();
|
||||
|
||||
|
||||
//! @param underEntity Walk the child entities that belong to @underEntity and consider adding them to the hierarchy.
|
||||
//! Builds the hierarchy using breadth-first iterative method.
|
||||
void InternalBuildHierarchyList(AZ::Entity* underEntity);
|
||||
|
||||
void SetRootForEntity(AZ::Entity* root, const AZ::Entity* childEntity);
|
||||
void SetRootForEntity(AZ::Entity* previousKnownRoot, AZ::Entity* newRoot, const AZ::Entity* childEntity);
|
||||
|
||||
//! Set to false when deactivating or otherwise not to be included in hierarchy considerations.
|
||||
bool m_isHierarchyEnabled = true;
|
||||
|
||||
AzNetworking::ConnectionId m_previousOwningConnectionId = AzNetworking::InvalidConnectionId;
|
||||
void SetOwningConnectionId(AzNetworking::ConnectionId connectionId) override;
|
||||
|
||||
friend class HierarchyBenchmarkBase;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user