Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SCR_SpawnRequestComponent Interface Reference

SCR_SpawnRequestComponent <-> SCR_SpawnHandlerComponent. More...

Inheritance diagram for SCR_SpawnRequestComponent:
[legend]

Public Member Functions

PlayerController GetPlayerController ()
 
int GetPlayerId ()
 
SCR_SpawnHandlerComponent GetHandlerComponent ()
 
TypeName GetHandlerType ()
 
TypeName GetDataType ()
 
sealed bool CanRequestRespawn (SCR_SpawnData data)
 Sends an ask request to the authority to find out whether spawn with provided data is valid.
 
sealed bool RequestRespawn (SCR_SpawnData data)
 Requests respawn with provided data.
 
bool IsPreloading ()
 
void StartSpawnPreload (vector position)
 
void ~SCR_SpawnRequestComponent ()
 

Protected Member Functions

SCR_RespawnComponent GetRespawnComponent ()
 
SCR_SpawnLockComponent GetLock ()
 
bool IsOwner ()
 
bool IsProxy ()
 
override void OnPostInit (IEntity owner)
 Initialises the component by finding necessary dependencies.
 
bool DoCanRequestRespawn (SCR_SpawnData data)
 Request is first handled on the sending side (player or authority depending on context).
 
void ProcessCanRequest_S (SCR_SpawnData data)
 Authority call to dispatch provided data to corresponding SCR_SpawnHandlerComponent.
 
void SendCanResponse_S (SCR_ESpawnResult response, SCR_SpawnData data)
 Authority: Sends a response from the server to the owner about current can-respawn request.
 
void Rpc_SendCanResponse_O (SCR_ESpawnResult response)
 Owner: Processes received response about current spawn process from the authority, dispatches events.
 
bool DoRequestRespawn (SCR_SpawnData data)
 Request is first handled on the sending side (player or authority depending on context).
 
void ProcessRequest_S (SCR_SpawnData data)
 Authority call to dispatch provided data to corresponding SCR_SpawnHandlerComponent.
 
void OnFinalizeBegin_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
 Authority callback when finalisation of spawn has began.
 
void AwaitFinalization_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
 Authority callback to await finalisation.
 
bool CanFinalize_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
 
void FinalizeRequest_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
 Authority call to finalise respawn, after ProcessRequest_S (AwaitFinalization_S respectively) has finished.
 
void SendResponse_S (SCR_ESpawnResult response, SCR_SpawnData data)
 Authority: Sends a response from the server to the owner about current respawn request.
 
void SendFinalizationBegin_S ()
 Send a notification from the authority that the finalisation has started.
 
void Rpc_OnFinalizationBegin_O ()
 
void NotifyPreloadStarted_S ()
 
void Rpc_NotifyPreloadStarted_S ()
 
void NotifyPreloadFinished_S ()
 
void Rpc_NotifyPreloadFinished_S ()
 
void Rpc_StartPreload_O (vector position)
 
void Rpc_SendResponse_O (SCR_ESpawnResult response)
 Owner: Processes received response about current spawn process from the authority, dispatches events.
 
SCR_ChimeraAIAgent FindAIAgent (IEntity entity)
 Tries to find AI agent for provided entity.
 

Detailed Description

SCR_SpawnRequestComponent <-> SCR_SpawnHandlerComponent.

SCR_SpawnRequestComponent allows communication between client and the authority, SCR_SpawnHandlerComponent handles the requests on authority as desired.

The respawn request component is the client (but can be issued by authority) component of the respawn process which sends respawn requests to be process by the authority. The process is further streamlined via the usage of a unified parent manager, the SCR_RespawnComponent.

Constructor & Destructor Documentation

◆ ~SCR_SpawnRequestComponent()

void SCR_SpawnRequestComponent.~SCR_SpawnRequestComponent ( )

Member Function Documentation

◆ AwaitFinalization_S()

void SCR_SpawnRequestComponent.AwaitFinalization_S ( SCR_SpawnHandlerComponent  handler,
SCR_SpawnData  data,
IEntity  spawnedEntity 
)
protected

Authority callback to await finalisation.

Parameters
[in]handler
[in]data
[in]spawnedEntity

◆ CanFinalize_S()

bool SCR_SpawnRequestComponent.CanFinalize_S ( SCR_SpawnHandlerComponent  handler,
SCR_SpawnData  data,
IEntity  spawnedEntity 
)
protected
Parameters
[in]handler
[in]data
[in]spawnedEntity
Returns
true if the finalisation can occur, false if not

◆ CanRequestRespawn()

sealed bool SCR_SpawnRequestComponent.CanRequestRespawn ( SCR_SpawnData  data)

Sends an ask request to the authority to find out whether spawn with provided data is valid.

Returned value does NOT correspond to the actual response. For reponse see available events.

Returns
true if the request was sent from this client properly, false otherwise.

◆ DoCanRequestRespawn()

bool SCR_SpawnRequestComponent.DoCanRequestRespawn ( SCR_SpawnData  data)
protected

Request is first handled on the sending side (player or authority depending on context).

This method can return false and will immediately raise a SCR_ESpawnResult.BAD_REQUEST response.

Returns
true in case request was sucessfully dispatched, false otherwise.

Implemented in SCR_FreeSpawnRequestComponent, SCR_PossessSpawnRequestComponent, and SCR_SpawnPointRespawnRequestComponent.

◆ DoRequestRespawn()

bool SCR_SpawnRequestComponent.DoRequestRespawn ( SCR_SpawnData  data)
protected

Request is first handled on the sending side (player or authority depending on context).

This method can return false and will immediately raise a SCR_ESpawnResult.BAD_REQUEST response.

Parameters
[in]data
Returns
true in case request was sucessfully dispatched, false otherwise.

Implemented in SCR_FreeSpawnRequestComponent, SCR_PossessSpawnRequestComponent, and SCR_SpawnPointRespawnRequestComponent.

◆ FinalizeRequest_S()

void SCR_SpawnRequestComponent.FinalizeRequest_S ( SCR_SpawnHandlerComponent  handler,
SCR_SpawnData  data,
IEntity  spawnedEntity 
)
protected

Authority call to finalise respawn, after ProcessRequest_S (AwaitFinalization_S respectively) has finished.

It is delayed to allow certain jobs (end of frame) to finish, before passing the ownership to the client.

Parameters
[in]handler
[in]data
[in]spawnedEntity

◆ FindAIAgent()

SCR_ChimeraAIAgent SCR_SpawnRequestComponent.FindAIAgent ( IEntity  entity)
protected

Tries to find AI agent for provided entity.

Parameters
[in]entity

◆ GetDataType()

TypeName SCR_SpawnRequestComponent.GetDataType ( )
Returns
the type of TData this TRequestComponent is linked to. Each request sent through a TRequestComponent accepts and handles a TData payload.

Implemented in SCR_FreeSpawnRequestComponent, SCR_PossessSpawnRequestComponent, and SCR_SpawnPointRespawnRequestComponent.

◆ GetHandlerComponent()

SCR_SpawnHandlerComponent SCR_SpawnRequestComponent.GetHandlerComponent ( )
Returns

◆ GetHandlerType()

TypeName SCR_SpawnRequestComponent.GetHandlerType ( )
Returns
the type of THandlerComponent component this TRequestComponent is linked to. Each request sent through a TRequestComponent is always processed via a THandlerComponent.

Implemented in SCR_FreeSpawnRequestComponent, SCR_PossessSpawnRequestComponent, and SCR_SpawnPointRespawnRequestComponent.

◆ GetLock()

SCR_SpawnLockComponent SCR_SpawnRequestComponent.GetLock ( )
protected
Returns
the lock component on owner PlayerController (if any) that is used to lock requests until they are resolved.

◆ GetPlayerController()

PlayerController SCR_SpawnRequestComponent.GetPlayerController ( )
Returns

◆ GetPlayerId()

int SCR_SpawnRequestComponent.GetPlayerId ( )
Returns

◆ GetRespawnComponent()

SCR_RespawnComponent SCR_SpawnRequestComponent.GetRespawnComponent ( )
protected

◆ IsOwner()

bool SCR_SpawnRequestComponent.IsOwner ( )
protected

◆ IsPreloading()

bool SCR_SpawnRequestComponent.IsPreloading ( )
Returns

◆ IsProxy()

bool SCR_SpawnRequestComponent.IsProxy ( )
protected

◆ NotifyPreloadFinished_S()

void SCR_SpawnRequestComponent.NotifyPreloadFinished_S ( )
protected

◆ NotifyPreloadStarted_S()

void SCR_SpawnRequestComponent.NotifyPreloadStarted_S ( )
protected

◆ OnFinalizeBegin_S()

void SCR_SpawnRequestComponent.OnFinalizeBegin_S ( SCR_SpawnHandlerComponent  handler,
SCR_SpawnData  data,
IEntity  spawnedEntity 
)
protected

Authority callback when finalisation of spawn has began.

Parameters
[in]handler
[in]data
[in]spawnedEntity

◆ OnPostInit()

override void SCR_SpawnRequestComponent.OnPostInit ( IEntity  owner)
protected

Initialises the component by finding necessary dependencies.

Parameters
[in]owner

◆ ProcessCanRequest_S()

void SCR_SpawnRequestComponent.ProcessCanRequest_S ( SCR_SpawnData  data)
protected

Authority call to dispatch provided data to corresponding SCR_SpawnHandlerComponent.

Handles responses when handler is not found or on request success internally.

Parameters
[in]data

◆ ProcessRequest_S()

void SCR_SpawnRequestComponent.ProcessRequest_S ( SCR_SpawnData  data)
protected

Authority call to dispatch provided data to corresponding SCR_SpawnHandlerComponent.

Handles responses when handler is not found or on request success internally.

Parameters
[in]data

◆ RequestRespawn()

sealed bool SCR_SpawnRequestComponent.RequestRespawn ( SCR_SpawnData  data)

Requests respawn with provided data.

! Note that even successful request can still be denied by the authority!

Parameters
[in]data
Returns
true in case success was sent from the client, false otherwise (early reject).

◆ Rpc_NotifyPreloadFinished_S()

void SCR_SpawnRequestComponent.Rpc_NotifyPreloadFinished_S ( )
protected

◆ Rpc_NotifyPreloadStarted_S()

void SCR_SpawnRequestComponent.Rpc_NotifyPreloadStarted_S ( )
protected

◆ Rpc_OnFinalizationBegin_O()

void SCR_SpawnRequestComponent.Rpc_OnFinalizationBegin_O ( )
protected

◆ Rpc_SendCanResponse_O()

void SCR_SpawnRequestComponent.Rpc_SendCanResponse_O ( SCR_ESpawnResult  response)
protected

Owner: Processes received response about current spawn process from the authority, dispatches events.

Parameters
[in]responseThe result of the respawning action.

◆ Rpc_SendResponse_O()

void SCR_SpawnRequestComponent.Rpc_SendResponse_O ( SCR_ESpawnResult  response)
protected

Owner: Processes received response about current spawn process from the authority, dispatches events.

Parameters
[in]responseThe result of the respawning action.

◆ Rpc_StartPreload_O()

void SCR_SpawnRequestComponent.Rpc_StartPreload_O ( vector  position)
protected

◆ SendCanResponse_S()

void SCR_SpawnRequestComponent.SendCanResponse_S ( SCR_ESpawnResult  response,
SCR_SpawnData  data 
)
protected

Authority: Sends a response from the server to the owner about current can-respawn request.

Parameters
[in]responseThe result of the request.
[in]dataThe data the request was instigated with.

◆ SendFinalizationBegin_S()

void SCR_SpawnRequestComponent.SendFinalizationBegin_S ( )
protected

Send a notification from the authority that the finalisation has started.

◆ SendResponse_S()

void SCR_SpawnRequestComponent.SendResponse_S ( SCR_ESpawnResult  response,
SCR_SpawnData  data 
)
protected

Authority: Sends a response from the server to the owner about current respawn request.

Parameters
[in]responseThe result of the respawning action.
[in]dataThe data the request was instigated with.

◆ StartSpawnPreload()

void SCR_SpawnRequestComponent.StartSpawnPreload ( vector  position)
Parameters
[in]position

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