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

Go to the source code of this file.

Classes

class  SCR_SpawnRequestComponentClass

Functions

SCR_RespawnComponent GetRespawnComponent ()
SCR_SpawnHandlerComponent GetHandlerComponent ()
SCR_SpawnLockComponent GetLock ()
bool IsOwner ()
bool IsProxy ()
override void OnPostInit (IEntity owner)
 Editable Mine.
sealed bool CanRequestRespawn (SCR_SpawnData data)
bool DoCanRequestRespawn (SCR_SpawnData data)
void ProcessCanRequest_S (SCR_SpawnData data)
void SendCanResponse_S (SCR_ESpawnResult response, SCR_SpawnData data)
void Rpc_SendCanResponse_O (SCR_ESpawnResult response)
sealed bool RequestRespawn (SCR_SpawnData data)
bool DoRequestRespawn (SCR_SpawnData data)
void ProcessRequest_S (SCR_SpawnData data)
void OnFinalizeBegin_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
void AwaitFinalization_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
bool CanFinalize_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
void FinalizeRequest_S (SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
void SendResponse_S (SCR_ESpawnResult response, SCR_SpawnData data)
void SendFinalizationBegin_S ()
 Send a notification from the authority that the finalisation has started.
void Rpc_OnFinalizationBegin_O ()
bool IsPreloading ()
void StartSpawnPreload (vector position)
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)
SCR_ChimeraAIAgent FindAIAgent (IEntity entity)
void ~SCR_SpawnRequestComponent ()

Variables

SCR_SpawnRequestComponentClass m_PlayerController

Function Documentation

◆ AwaitFinalization_S()

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

Authority callback to await finalisation.

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

Definition at line 415 of file SCR_SpawnRequestComponent.c.

◆ CanFinalize_S()

bool 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

Definition at line 441 of file SCR_SpawnRequestComponent.c.

◆ CanRequestRespawn()

sealed bool CanRequestRespawn ( SCR_SpawnData data)
protected

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.

Definition at line 163 of file SCR_SpawnRequestComponent.c.

◆ DoCanRequestRespawn()

bool 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.

Definition at line 201 of file SCR_SpawnRequestComponent.c.

◆ DoRequestRespawn()

bool 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.

Definition at line 334 of file SCR_SpawnRequestComponent.c.

◆ FinalizeRequest_S()

void 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

Definition at line 456 of file SCR_SpawnRequestComponent.c.

◆ FindAIAgent()

SCR_ChimeraAIAgent FindAIAgent ( IEntity entity)
protected

Tries to find AI agent for provided entity.

Parameters
[in]entity

Definition at line 606 of file SCR_SpawnRequestComponent.c.

◆ GetHandlerComponent()

SCR_SpawnHandlerComponent GetHandlerComponent ( )
protected
Returns

Definition at line 55 of file SCR_SpawnRequestComponent.c.

◆ GetLock()

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

Definition at line 62 of file SCR_SpawnRequestComponent.c.

◆ IsPreloading()

bool IsPreloading ( )
protected
Returns

Definition at line 523 of file SCR_SpawnRequestComponent.c.

◆ NotifyPreloadFinished_S()

void NotifyPreloadFinished_S ( )
protected

Definition at line 554 of file SCR_SpawnRequestComponent.c.

◆ NotifyPreloadStarted_S()

void NotifyPreloadStarted_S ( )
protected

Definition at line 540 of file SCR_SpawnRequestComponent.c.

◆ OnFinalizeBegin_S()

void 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

Definition at line 401 of file SCR_SpawnRequestComponent.c.

◆ ProcessCanRequest_S()

void 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

Definition at line 211 of file SCR_SpawnRequestComponent.c.

◆ ProcessRequest_S()

void 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

Definition at line 344 of file SCR_SpawnRequestComponent.c.

◆ RequestRespawn()

sealed bool RequestRespawn ( SCR_SpawnData data)
protected

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

Definition at line 298 of file SCR_SpawnRequestComponent.c.

◆ Rpc_NotifyPreloadFinished_S()

void Rpc_NotifyPreloadFinished_S ( )
protected

Definition at line 562 of file SCR_SpawnRequestComponent.c.

◆ Rpc_NotifyPreloadStarted_S()

void Rpc_NotifyPreloadStarted_S ( )
protected

Definition at line 548 of file SCR_SpawnRequestComponent.c.

◆ Rpc_OnFinalizationBegin_O()

void Rpc_OnFinalizationBegin_O ( )
protected

Definition at line 511 of file SCR_SpawnRequestComponent.c.

◆ Rpc_SendCanResponse_O()

void 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.

Definition at line 274 of file SCR_SpawnRequestComponent.c.

◆ Rpc_SendResponse_O()

void 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.

Definition at line 583 of file SCR_SpawnRequestComponent.c.

◆ Rpc_StartPreload_O()

void Rpc_StartPreload_O ( vector position)
protected

Definition at line 571 of file SCR_SpawnRequestComponent.c.

◆ SendCanResponse_S()

void 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.

Definition at line 247 of file SCR_SpawnRequestComponent.c.

◆ SendFinalizationBegin_S()

void SendFinalizationBegin_S ( )
protected

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

Definition at line 501 of file SCR_SpawnRequestComponent.c.

◆ SendResponse_S()

void 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.

Definition at line 477 of file SCR_SpawnRequestComponent.c.

◆ StartSpawnPreload()

void StartSpawnPreload ( vector position)
protected
Parameters
[in]position

Definition at line 531 of file SCR_SpawnRequestComponent.c.

◆ ~SCR_SpawnRequestComponent()

void ~SCR_SpawnRequestComponent ( )
protected

Definition at line 623 of file SCR_SpawnRequestComponent.c.

Variable Documentation

◆ m_PlayerController

SCR_SpawnRequestComponentClass m_PlayerController

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.