Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RespawnComponent.c File Reference

Go to the source code of this file.

Classes

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.
bool RequestClearPlayerFaction ()
bool RequestClearPlayerLoadout ()
void RequestClearPlayerSpawnPoint ()
bool RequestPlayerLoadout (SCR_BasePlayerLoadout loadout)
bool RequestPlayerFaction (Faction faction)
bool RequestPlayerSpawnPoint (SCR_SpawnPoint spawnPoint)
void RequestPlayerSuicide ()
void RequestPlayerLoadoutIndex (int loadoutIndex)
void RequestPlayerFactionIndex (int factionIndex)
void RequestPlayerSpawnPointIdentity (RplId spawnPointIdentity)
void NotifyReadyForSpawn_S ()
void Rpc_NotifyReadyForSpawn_O ()
void RequestQuickRespawn ()
void RequestRespawn ()
 Sends a respawn request based on assigned loadout and selected spawn point.
override void OnPostInit (IEntity owner)
 Editable Mine.
override void OnDelete (IEntity owner)
bool RequestSpawn (SCR_SpawnData data)
bool CanSpawn (SCR_SpawnData data)
void RegisterRespawnRequestComponents (IEntity owner)
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.
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.
SCR_RespawnComponentClass m_PlayerController = 2
 Parent entity (owner) - has to be a player controller for RPCs.
RplComponent m_RplComponent
 Parent entity's rpl component.
ref map< typename, SCR_SpawnRequestComponent > m_mRequestComponents = new map<typename, SCR_SpawnRequestComponent>()
ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()
ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()
ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()
ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()
ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()
ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()
ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()
ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()
ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()
ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()

Function Documentation

◆ CanSpawn()

bool CanSpawn ( SCR_SpawnData data)
protected

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 380 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnRequestInvoker_O()

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

Definition at line 58 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnRequestInvoker_S()

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

Definition at line 67 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnResponseInvoker_O()

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

Definition at line 78 of file SCR_RespawnComponent.c.

◆ GetOnCanRespawnResponseInvoker_S()

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

Definition at line 88 of file SCR_RespawnComponent.c.

◆ GetOnRespawnFinalizeBeginInvoker_O()

OnRespawnRequestInvoker GetOnRespawnFinalizeBeginInvoker_O ( )
protected

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 138 of file SCR_RespawnComponent.c.

◆ GetOnRespawnReadyInvoker_O()

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

Definition at line 48 of file SCR_RespawnComponent.c.

◆ GetOnRespawnRequestInvoker_O()

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

Definition at line 98 of file SCR_RespawnComponent.c.

◆ GetOnRespawnRequestInvoker_S()

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

Definition at line 107 of file SCR_RespawnComponent.c.

◆ GetOnRespawnResponseInvoker_O()

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

Definition at line 117 of file SCR_RespawnComponent.c.

◆ GetOnRespawnResponseInvoker_S()

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

Definition at line 126 of file SCR_RespawnComponent.c.

◆ GetRequestComponent()

SCR_SpawnRequestComponent GetRequestComponent ( SCR_SpawnData data)
protected

Find a request component based on provided data instance type.

Parameters
[in]data
Returns

Definition at line 432 of file SCR_RespawnComponent.c.

◆ NotifyReadyForSpawn_S()

void NotifyReadyForSpawn_S ( )
protected

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

Definition at line 251 of file SCR_RespawnComponent.c.

◆ OnDelete()

override void OnDelete ( IEntity owner)
protected

Definition at line 330 of file SCR_RespawnComponent.c.

◆ RegisterRespawnRequestComponents()

void RegisterRespawnRequestComponents ( IEntity owner)
protected

Register all SCR_SpawnRequestComponent found in the hierarchy.

Parameters
[in]owner

Definition at line 396 of file SCR_RespawnComponent.c.

◆ RequestClearPlayerFaction()

bool RequestClearPlayerFaction ( )
protected

◆ RequestClearPlayerLoadout()

bool RequestClearPlayerLoadout ( )
protected

◆ RequestClearPlayerSpawnPoint()

void RequestClearPlayerSpawnPoint ( )
protected

◆ RequestPlayerFaction()

bool RequestPlayerFaction ( Faction faction)
protected

◆ RequestPlayerFactionIndex()

void RequestPlayerFactionIndex ( int factionIndex)
protected

◆ RequestPlayerLoadout()

bool RequestPlayerLoadout ( SCR_BasePlayerLoadout loadout)
protected

◆ RequestPlayerLoadoutIndex()

void RequestPlayerLoadoutIndex ( int loadoutIndex)
protected

◆ RequestPlayerSpawnPoint()

bool RequestPlayerSpawnPoint ( SCR_SpawnPoint spawnPoint)
protected

◆ RequestPlayerSpawnPointIdentity()

void RequestPlayerSpawnPointIdentity ( RplId spawnPointIdentity)
protected

◆ RequestPlayerSuicide()

void RequestPlayerSuicide ( )
protected

Definition at line 219 of file SCR_RespawnComponent.c.

◆ RequestQuickRespawn()

void RequestQuickRespawn ( )
protected

◆ RequestRespawn()

void RequestRespawn ( )
protected

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

Definition at line 760 of file SCR_DeployMenuBase.c.

◆ RequestSpawn()

bool RequestSpawn ( SCR_SpawnData data)
protected

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 352 of file SCR_RespawnComponent.c.

◆ Rpc_NotifyReadyForSpawn_O()

void Rpc_NotifyReadyForSpawn_O ( )
protected

Definition at line 258 of file SCR_RespawnComponent.c.

◆ SCR_RespawnComponent()

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

Definition at line 565 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

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

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

Definition at line 28 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnRequestInvoker_O

ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O = new OnCanRespawnRequestInvoker()
protected

Definition at line 54 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnRequestInvoker_S

ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S = new OnCanRespawnRequestInvoker()
protected

Definition at line 63 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnResponseInvoker_O

ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O = new OnCanRespawnResponseInvoker()
protected

Definition at line 73 of file SCR_RespawnComponent.c.

◆ m_OnCanRespawnResponseInvoker_S

ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S = new OnCanRespawnResponseInvoker()
protected

Definition at line 83 of file SCR_RespawnComponent.c.

◆ m_OnRespawnFinalizeBeginInvoker_O

ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O = new OnRespawnRequestInvoker()
protected

Definition at line 133 of file SCR_RespawnComponent.c.

◆ m_OnRespawnReadyInvoker_O

ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O = new OnRespawnReadyInvoker()
protected

Definition at line 44 of file SCR_RespawnComponent.c.

◆ m_OnRespawnRequestInvoker_O

ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O = new OnRespawnRequestInvoker()
protected

Definition at line 94 of file SCR_RespawnComponent.c.

◆ m_OnRespawnRequestInvoker_S

ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S = new OnRespawnRequestInvoker()
protected

Definition at line 103 of file SCR_RespawnComponent.c.

◆ m_OnRespawnResponseInvoker_O

ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O = new OnRespawnResponseInvoker()
protected

Definition at line 113 of file SCR_RespawnComponent.c.

◆ m_OnRespawnResponseInvoker_S

ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S = new OnRespawnResponseInvoker()
protected

Definition at line 122 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

RplComponent m_RplComponent
protected

Parent entity's rpl component.

Definition at line 23 of file SCR_RespawnComponent.c.

◆ OK

OK = 0

Result code for request/assign response.

Definition at line 14 of file EMoveError.c.