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::INetworkTime Class Referenceabstract

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

#include <INetworkTime.h>

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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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)

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