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

This is an AZ::Interface<> for managing multiplayer specific time related operations. More...

#include <INetworkTime.h>

Inherited by Multiplayer::NetworkTime.

Public Member Functions

 AZ_RTTI (INetworkTime, "{7D468063-255B-4FEE-86E1-6D750EEDD42A}")
 
virtual bool IsTimeRewound () const =0
 
virtual HostFrameId GetHostFrameId () const =0
 
virtual HostFrameId GetUnalteredHostFrameId () const =0
 
virtual void IncrementHostFrameId ()=0
 Increments the hosts current frameId.
 
virtual AZ::TimeMs GetHostTimeMs () const =0
 
virtual float GetHostBlendFactor () const =0
 
virtual AzNetworking::ConnectionId GetRewindingConnectionId () const =0
 
virtual void ForceSetTime (HostFrameId frameId, AZ::TimeMs timeMs)=0
 
virtual void AlterTime (HostFrameId frameId, AZ::TimeMs timeMs, float blendFactor, AzNetworking::ConnectionId rewindConnectionId)=0
 
virtual void SyncEntitiesToRewindState (const AZ::Aabb &rewindVolume)=0
 
virtual void ClearRewoundEntities ()=0
 Restores all rewound entities to the current application time.
 
 AZ_DISABLE_COPY_MOVE (INetworkTime)
 

Detailed Description

This is an AZ::Interface<> for managing multiplayer specific time related operations.

Member Function Documentation

◆ AlterTime()

virtual void Multiplayer::INetworkTime::AlterTime ( HostFrameId  frameId,
AZ::TimeMs  timeMs,
float  blendFactor,
AzNetworking::ConnectionId  rewindConnectionId 
)
pure virtual

Alters the current HostFrameId and binds that alteration to the provided ConnectionId.

Parameters
frameIdthe new HostFrameId to use
timeMsthe new HostTimeMs to use
blendFactorthe factor used to blend between values at the current and previous HostFrameId
rewindConnectionIdthe rewinding ConnectionId

Implemented in Multiplayer::NetworkTime.

◆ ClearRewoundEntities()

virtual void Multiplayer::INetworkTime::ClearRewoundEntities ( )
pure virtual

Restores all rewound entities to the current application time.

Implemented in Multiplayer::NetworkTime.

◆ ForceSetTime()

virtual void Multiplayer::INetworkTime::ForceSetTime ( HostFrameId  frameId,
AZ::TimeMs  timeMs 
)
pure virtual

Forcibly sets the current network time to the provided frameId and game time in milliseconds.

Parameters
frameIdthe new HostFrameId to use
timeMsthe new HostTimeMs to use

Implemented in Multiplayer::NetworkTime.

◆ GetHostBlendFactor()

virtual float Multiplayer::INetworkTime::GetHostBlendFactor ( ) const
pure virtual

Retrieves the hosts current blend factor (may be rewound on the server during backward reconciliation).

Returns
the hosts current blend factor

Implemented in Multiplayer::NetworkTime.

◆ GetHostFrameId()

virtual HostFrameId Multiplayer::INetworkTime::GetHostFrameId ( ) const
pure virtual

Retrieves the hosts current frameId (may be rewound on the server during backward reconciliation).

Returns
the hosts current frameId

Implemented in Multiplayer::NetworkTime.

◆ GetHostTimeMs()

virtual AZ::TimeMs Multiplayer::INetworkTime::GetHostTimeMs ( ) const
pure virtual

Retrieves the hosts current timeMs (may be rewound on the server during backward reconciliation).

Returns
the hosts current timeMs

Implemented in Multiplayer::NetworkTime.

◆ GetRewindingConnectionId()

virtual AzNetworking::ConnectionId Multiplayer::INetworkTime::GetRewindingConnectionId ( ) const
pure virtual

Get the controlling connection that may be currently altering global game time. Note this abstraction is required at a relatively high level to allow for 'don't rewind the shooter' semantics

Returns
the ConnectionId of the connection requesting the rewind operation

Implemented in Multiplayer::NetworkTime.

◆ GetUnalteredHostFrameId()

virtual HostFrameId Multiplayer::INetworkTime::GetUnalteredHostFrameId ( ) const
pure virtual

Retrieves the unaltered hosts current frameId.

Returns
the hosts current frameId, unaltered by any scoped time instance

Implemented in Multiplayer::NetworkTime.

◆ IncrementHostFrameId()

virtual void Multiplayer::INetworkTime::IncrementHostFrameId ( )
pure virtual

Increments the hosts current frameId.

Implemented in Multiplayer::NetworkTime.

◆ IsTimeRewound()

virtual bool Multiplayer::INetworkTime::IsTimeRewound ( ) const
pure virtual

Returns true if the host timeMs and frameId has been temporarily altered.

Returns
true if the host timeMs and frameId has been altered, false otherwise

Implemented in Multiplayer::NetworkTime.

◆ SyncEntitiesToRewindState()

virtual void Multiplayer::INetworkTime::SyncEntitiesToRewindState ( const AZ::Aabb &  rewindVolume)
pure virtual

Syncs all entities contained within a volume to the current rewind state.

Parameters
rewindVolumethe volume to rewind entities within (needed for physics entities)

Implemented in Multiplayer::NetworkTime.


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