Open 3D Engine Multiplayer Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Multiplayer::IReplicationWindow Class Referenceabstract

Inherited by Multiplayer::NullReplicationWindow, and Multiplayer::ServerToClientReplicationWindow.

Public Member Functions

virtual bool ReplicationSetUpdateReady ()=0
 
virtual const ReplicationSet & GetReplicationSet () const =0
 
virtual uint32_t GetMaxProxyEntityReplicatorSendCount () const =0
 
virtual bool IsInWindow (const ConstNetworkEntityHandle &entityPtr, NetEntityRole &outNetworkRole) const =0
 
virtual bool AddEntity (AZ::Entity *entity)=0
 
virtual void RemoveEntity (AZ::Entity *entity)=0
 
virtual void UpdateWindow ()=0
 This updates the replication set, ensuring all relevant entities are included.
 
virtual AzNetworking::PacketId SendEntityUpdateMessages (NetworkEntityUpdateVector &entityUpdateVector)=0
 
virtual void SendEntityRpcs (NetworkEntityRpcVector &entityRpcVector, bool reliable)=0
 
virtual void SendEntityResets (const NetEntityIdSet &resetIds)=0
 
virtual void DebugDraw () const =0
 This causes the replication window to perform debug-draw overlays.
 

Member Function Documentation

◆ AddEntity()

virtual bool Multiplayer::IReplicationWindow::AddEntity ( AZ::Entity *  entity)
pure virtual

Adds an entity to the replication window's set

Parameters
entityThe entity to try adding
Returns
Whether the entity was able to be added

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ GetMaxProxyEntityReplicatorSendCount()

virtual uint32_t Multiplayer::IReplicationWindow::GetMaxProxyEntityReplicatorSendCount ( ) const
pure virtual

Max number of entities we can send updates for in one frame.

Returns
the max number of entities we can send updates for in one frame

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ GetReplicationSet()

virtual const ReplicationSet& Multiplayer::IReplicationWindow::GetReplicationSet ( ) const
pure virtual

Returns the set of entities, roles, and priorities marked for replication by this replication window.

Returns
const reference to the replication windows replication set

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ IsInWindow()

virtual bool Multiplayer::IReplicationWindow::IsInWindow ( const ConstNetworkEntityHandle entityPtr,
NetEntityRole &  outNetworkRole 
) const
pure virtual

Returns true if the provided network entity is within this replication window.

Parameters
entityPtrthe handle of the entity to test for inclusion
outNetworkRoleoutput containing the network role of the requested entity if found

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ RemoveEntity()

virtual void Multiplayer::IReplicationWindow::RemoveEntity ( AZ::Entity *  entity)
pure virtual

Removes an entity from the replication window's set, if present

Parameters
entityThe entity to remove

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ ReplicationSetUpdateReady()

virtual bool Multiplayer::IReplicationWindow::ReplicationSetUpdateReady ( )
pure virtual

Queries whether or not the replication window is in a state capable of sending entity update messages.

Returns
boolean true if the replication window is ready and in a valid state, false otherwise

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ SendEntityResets()

virtual void Multiplayer::IReplicationWindow::SendEntityResets ( const NetEntityIdSet &  resetIds)
pure virtual

This sends an EntityReset message on the associated network interface and connection. This will reset the replicators on the remote endpoint and cause a full refresh of the specified entities

Parameters
resetIdsthe set of netEntityIds to refresh

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ SendEntityRpcs()

virtual void Multiplayer::IReplicationWindow::SendEntityRpcs ( NetworkEntityRpcVector &  entityRpcVector,
bool  reliable 
)
pure virtual

This sends an EntityRpcs message on the associated network interface and connection.

Parameters
entityRpcVectorthe rpc data set to transmit
reliableif a value of true is passed, the rpc message will be sent reliably, unreliably if false

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.

◆ SendEntityUpdateMessages()

virtual AzNetworking::PacketId Multiplayer::IReplicationWindow::SendEntityUpdateMessages ( NetworkEntityUpdateVector &  entityUpdateVector)
pure virtual

This sends an EntityUpdate message on the associated network interface and connection.

Parameters
entityUpdateVectorset of entity updates
Returns
the packetId of the sent update message, or InvalidPacketId in the case of failure

Implemented in Multiplayer::ServerToClientReplicationWindow, and Multiplayer::NullReplicationWindow.


The documentation for this class was generated from the following file: