Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_RespawnComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_RespawnComponentClass
 

Functions

OnRespawnReadyInvoker GetOnRespawnReadyInvoker_O ()
 
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_O ()
 
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_S ()
 
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_O ()
 
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_S ()
 
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_O ()
 
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_S ()
 
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_O ()
 
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_S ()
 
OnRespawnRequestInvoker GetOnRespawnFinalizeBeginInvoker_O ()
 
RplComponent GetRplComponent ()
 Returns the replication component associated to this entity. More...
 
bool RequestClearPlayerFaction ()
 
bool RequestClearPlayerLoadout ()
 
void RequestClearPlayerSpawnPoint ()
 
bool RequestPlayerLoadout (SCR_BasePlayerLoadout loadout)
 
bool RequestPlayerFaction (Faction faction)
 
bool RequestPlayerSpawnPoint (SCR_SpawnPoint spawnPoint)
 
void RequestPlayerSuicide ()
 
protected void RequestPlayerLoadoutIndex (int loadoutIndex)
 
protected void RequestPlayerFactionIndex (int factionIndex)
 
protected void RequestPlayerSpawnPointIdentity (RplId spawnPointIdentity)
 
void NotifyReadyForSpawn_S ()
 
protected void Rpc_NotifyReadyForSpawn_O ()
 
void RequestQuickRespawn ()
 
void RequestRespawn ()
 Sends a respawn request based on assigned loadout and selected spawn point. More...
 
override void OnPostInit (IEntity owner)
 Editable Mine. More...
 
override void OnDelete (IEntity owner)
 
bool RequestSpawn (SCR_SpawnData data)
 
bool CanSpawn (SCR_SpawnData data)
 
protected void RegisterRespawnRequestComponents (IEntity owner)
 
protected SCR_SpawnRequestComponent GetRequestComponent (SCR_SpawnData data)
 
void SCR_RespawnComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Variables

SCR_RespawnComponentClass OK = 0
 Result code for request/assign response. More...
 
SCR_RespawnComponentClass ERROR = 1
 
SCR_RespawnComponentClass ERROR_FORBIDDEN = 2
 Can happen if we are setting a loadout from a faction to which we do not belong to or similar. More...
 
SCR_RespawnComponentClass m_PlayerController = 2
 Parent entity (owner) - has to be a player controller for RPCs. More...
 
protected RplComponent m_RplComponent
 Parent entity's rpl component. More...
 
protected ref map< typename, SCR_SpawnRequestComponent > m_mRequestComponents = new map<typename, SCR_SpawnRequestComponent>()
 
protected ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()
 
protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()
 
protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()
 
protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()
 
protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()
 
protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()
 
protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()
 
protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()
 
protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()
 
protected ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()
 

Function Documentation

◆ CanSpawn()

bool CanSpawn ( SCR_SpawnData  data)

Request an authority confirmation whether spawn with the provided data is possible.

The request is partially validated on client before transmission to the authority occurs. It is then further evaluated and processed by a SCR_RespawnHandlerComponent corresponding to each SCR_SpawnRequestComponent.

Notable callbacks:

  • GetOnCanRespawnRequestInvoker_O -> Raised on owner request ('sender' has asked)
  • GetOnCanRespawnResponseInvoker_O -> Raised on owner response (authority has responded or in certain cases early reject is done by self)
  • GetOnCanRespawnRequestInvoker_S -> Authority received request from this component
  • GetOnCanRespawnResponseInvoker_S -> Authority dispatched response to this component
    Parameters
    [in]data
    Returns
    Returns true if the request was dispatched into the system, false if there was an error on the requesting side. Such case can occur e.g. when there is a missing respawn handler for provided data type or similar.

Definition at line 392 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnRequestInvoker_O()

OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_O ( )
Returns
an invoker that is invoked after this component sends a can-request.

Definition at line 70 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnRequestInvoker_S()

OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_S ( )
Returns
an invoker that is invoked after this component sends a can-request.

Definition at line 79 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnResponseInvoker_O()

OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a response from the authority about prior sent ask can-request.

Definition at line 90 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnResponseInvoker_S()

OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a response from teh authority about prior sent ask can-request.

Definition at line 100 of file SCR_RespawnComponent.c.

◆ GetOnRespawnFinalizeBeginInvoker_O()

OnRespawnRequestInvoker GetOnRespawnFinalizeBeginInvoker_O ( )

When the spawn process reaches it end, the authority notifies the client about the last state starting ("finalization"). This is the last state after which the player gains control of the desired controllable, or receives a response (see GetOnRespawnResponseInvoker_O) about a possible (rare?) failure.

Definition at line 150 of file SCR_RespawnComponent.c.

◆ GetOnRespawnReadyInvoker_O()

OnRespawnReadyInvoker GetOnRespawnReadyInvoker_O ( )
Returns
an invoker that is invoked after this player is "ready" to spawn. (E.g. open deployment menu)

Definition at line 60 of file SCR_RespawnComponent.c.

◆ GetOnRespawnRequestInvoker_O()

OnRespawnRequestInvoker GetOnRespawnRequestInvoker_O ( )
Returns
an invoker that is invoked after this component sends a respawn request.

Definition at line 110 of file SCR_RespawnComponent.c.

◆ GetOnRespawnRequestInvoker_S()

OnRespawnRequestInvoker GetOnRespawnRequestInvoker_S ( )
Returns
an invoker that is invoked after this component sends a respawn request.

Definition at line 119 of file SCR_RespawnComponent.c.

◆ GetOnRespawnResponseInvoker_O()

OnRespawnResponseInvoker GetOnRespawnResponseInvoker_O ( )
Returns
an invoker that is invoked after this component receives a respawn request response from the authority.

Definition at line 129 of file SCR_RespawnComponent.c.

◆ GetOnRespawnResponseInvoker_S()

OnRespawnResponseInvoker GetOnRespawnResponseInvoker_S ( )
Returns
an invoker that is invoked after this component receives a respawn request response from the authority.

Definition at line 138 of file SCR_RespawnComponent.c.

◆ GetRequestComponent()

protected SCR_SpawnRequestComponent GetRequestComponent ( SCR_SpawnData  data)

Find a request component based on provided data instance type.

Parameters
[in]data
Returns

Definition at line 444 of file SCR_RespawnComponent.c.

◆ NotifyReadyForSpawn_S()

void NotifyReadyForSpawn_S ( )

Authority: Send notification to this player that they are ready to spawn.

Definition at line 263 of file SCR_RespawnComponent.c.

◆ RegisterRespawnRequestComponents()

protected void RegisterRespawnRequestComponents ( IEntity  owner)

Register all SCR_SpawnRequestComponent found in the hierarchy.

Parameters
[in]owner

Definition at line 408 of file SCR_RespawnComponent.c.

◆ RequestClearPlayerFaction()

bool RequestClearPlayerFaction ( )

◆ RequestClearPlayerLoadout()

bool RequestClearPlayerLoadout ( )

◆ RequestClearPlayerSpawnPoint()

void RequestClearPlayerSpawnPoint ( )

◆ RequestPlayerFaction()

bool RequestPlayerFaction ( Faction  faction)

◆ RequestPlayerFactionIndex()

protected void RequestPlayerFactionIndex ( int  factionIndex)

◆ RequestPlayerLoadout()

bool RequestPlayerLoadout ( SCR_BasePlayerLoadout  loadout)

◆ RequestPlayerLoadoutIndex()

protected void RequestPlayerLoadoutIndex ( int  loadoutIndex)

◆ RequestPlayerSpawnPoint()

bool RequestPlayerSpawnPoint ( SCR_SpawnPoint  spawnPoint)

◆ RequestPlayerSpawnPointIdentity()

protected void RequestPlayerSpawnPointIdentity ( RplId  spawnPointIdentity)

◆ RequestPlayerSuicide()

void RequestPlayerSuicide ( )

Definition at line 231 of file SCR_RespawnComponent.c.

◆ RequestQuickRespawn()

void RequestQuickRespawn ( )

◆ RequestRespawn()

void RequestRespawn ( )

Sends a respawn request based on assigned loadout and selected spawn point.

Definition at line 694 of file SCR_DeployMenuBase.c.

◆ RequestSpawn()

bool RequestSpawn ( SCR_SpawnData  data)

Request a spawn with the provided data.

The request is partially validated on client before transmission to the authority occurs. It is then further evaluated and processed by a SCR_RespawnHandlerComponent corresponding to each SCR_SpawnRequestComponent.

Notable callbacks:

  • GetOnRespawnRequestInvoker_O -> Raised on owner request ('sender' has asked)
  • GetOnRespawnResponseInvoker_O -> Raised on owner response (authority has responded or in certain cases early reject is done by self)
  • GetOnRespawnRequestInvoker_S -> Authority received request from this component
  • GetOnRespawnResponseInvoker_S -> Authority dispatched response to this component
    Parameters
    [in]data
    Returns
    Returns true if the request was dispatched into the system, false if there was an error on the requesting side. Such case can occur e.g. when there is a missing respawn handler for provided data type or similar.

Definition at line 364 of file SCR_RespawnComponent.c.

◆ Rpc_NotifyReadyForSpawn_O()

protected void Rpc_NotifyReadyForSpawn_O ( )

Definition at line 270 of file SCR_RespawnComponent.c.

◆ SCR_RespawnComponent()

void SCR_RespawnComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

Definition at line 576 of file SCR_RespawnComponent.c.

Variable Documentation

◆ ERROR

◆ ERROR_FORBIDDEN

SCR_RespawnComponentClass ERROR_FORBIDDEN = 2

Can happen if we are setting a loadout from a faction to which we do not belong to or similar.

◆ m_mRequestComponents

protected ref map<typename, SCR_SpawnRequestComponent> m_mRequestComponents = new map<typename, SCR_SpawnRequestComponent>()

List of all request components - children of this component, stored by their assigned type. See also:SCR_SpawnRequestComponent.GetDataType()

Definition at line 40 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnRequestInvoker_O

protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()

Definition at line 66 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnRequestInvoker_S

protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()

Definition at line 75 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnResponseInvoker_O

protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()

Definition at line 85 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnResponseInvoker_S

protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()

Definition at line 95 of file SCR_RespawnComponent.c.

◆ m_OnRespawnFinalizeBeginInvoker_O

protected ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()

Definition at line 145 of file SCR_RespawnComponent.c.

◆ m_OnRespawnReadyInvoker_O

protected ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()

Definition at line 56 of file SCR_RespawnComponent.c.

◆ m_OnRespawnRequestInvoker_O

protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()

Definition at line 106 of file SCR_RespawnComponent.c.

◆ m_OnRespawnRequestInvoker_S

protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()

Definition at line 115 of file SCR_RespawnComponent.c.

◆ m_OnRespawnResponseInvoker_O

protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()

Definition at line 125 of file SCR_RespawnComponent.c.

◆ m_OnRespawnResponseInvoker_S

protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()

Definition at line 134 of file SCR_RespawnComponent.c.

◆ m_PlayerController

SCR_RespawnComponentClass m_PlayerController = 2

Parent entity (owner) - has to be a player controller for RPCs.

Dummy communicator for RespawnSystem. Must be attached to PlayerController entity.

◆ m_RplComponent

protected RplComponent m_RplComponent

Parent entity's rpl component.

Definition at line 35 of file SCR_RespawnComponent.c.

◆ OK

OK = 0

Result code for request/assign response.

Definition at line 14 of file ECanBeEquippedResult.c.