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

Go to the source code of this file.

Data Structures

class  SCR_RespawnTimerComponentClass
 

Macros

#define RESPAWN_TIMER_COMPONENT_DEBUG
 

Functions

SCR_RespawnTimerComponentClass SCR_BaseGameModeComponentClass Attribute ("10", UIWidgets.EditBox, "Default time in seconds that a player has to wait after dead to respawn.", category:"Respawn Timers")] protected float m_fRespawnTime
 Must be attached to a GameMode. More...
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
protected bool IsMaster ()
 Are we the master of this component's RplComponent node? More...
 
protected WorldTimestamp GetCurrentTime ()
 
void SetRespawnTime (int playerID, float respawnTime)
 
bool IsPlayerEnqueued (int playerID)
 
bool GetCanPlayerSpawn (int playerID, float additionalTime=0)
 
int GetPlayerRemainingTime (int playerID, float additionalTime=0)
 
override void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
override void OnPlayerDeleted (int playerId, IEntity player)
 
private void RpcDo_StartTimer_BC (int playerId, WorldTimestamp rplTime)
 
private void RpcDo_SetDuration_BC (int playerId, float duration)
 
private void RpcDo_SetDurationAll_BC (float duration)
 
override void OnPlayerRegistered (int playerId)
 Register provided client's respawn timer. More...
 
void SetRespawnTime (float respawnTime)
 
float GetRespawnTime ()
 
protected void DrawDebugInfo ()
 
override void EOnDiag (IEntity owner, float timeSlice)
 
override void OnPostInit (IEntity owner)
 Editable Mine. More...
 
override void OnDelete (IEntity owner)
 
void SCR_RespawnTimerComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_RespawnTimerComponent ()
 

Variables

protected ref map< int, ref SCR_RespawnTimerm_mRespawnTimers = new map<int, ref SCR_RespawnTimer>()
 
protected RplComponent m_RplComponent
 RplComponent attached to this component's owner entity. More...
 

Macro Definition Documentation

◆ RESPAWN_TIMER_COMPONENT_DEBUG

#define RESPAWN_TIMER_COMPONENT_DEBUG

Function Documentation

◆ Attribute()

SCR_RespawnTimerComponentClass SCR_BaseGameModeComponentClass Attribute ( "10"  ,
UIWidgets.  EditBox,
"Default time in seconds that a player has to wait after dead to respawn."  ,
category:"Respawn Timers"   
)

Must be attached to a GameMode.

◆ DrawDebugInfo()

protected void DrawDebugInfo ( )

Definition at line 254 of file SCR_RespawnTimerComponent.c.

◆ GetCanPlayerSpawn()

bool GetCanPlayerSpawn ( int  playerID,
float  additionalTime = 0 
)

Only relevant to server and local player.

Parameters
[in]playerID
[in]additionalTime
Returns

Definition at line 115 of file SCR_RespawnTimerComponent.c.

◆ GetCurrentTime()

protected WorldTimestamp GetCurrentTime ( )
Returns
time in seconds after world start. Synchronised to clients.

Definition at line 79 of file SCR_RespawnTimerComponent.c.

◆ GetPlayerRemainingTime()

int GetPlayerRemainingTime ( int  playerID,
float  additionalTime = 0 
)
Parameters
[in]playerID
[in]additionalTime
Returns

Definition at line 130 of file SCR_RespawnTimerComponent.c.

◆ GetRespawnTime()

float GetRespawnTime ( )
Returns

Definition at line 239 of file SCR_RespawnTimerComponent.c.

◆ IsMaster()

protected bool IsMaster ( )

Are we the master of this component's RplComponent node?

Definition at line 72 of file SCR_RespawnTimerComponent.c.

◆ IsPlayerEnqueued()

bool IsPlayerEnqueued ( int  playerID)
Parameters
[in]playerID
Returns

Definition at line 105 of file SCR_RespawnTimerComponent.c.

◆ OnPlayerDeleted()

override void OnPlayerDeleted ( int  playerId,
IEntity  player 
)

Called after a player gets deleted.

Parameters
[in]playerIdPlayer ID
[in]playerPlayer entity

Definition at line 168 of file SCR_RespawnTimerComponent.c.

◆ RpcDo_SetDuration_BC()

private void RpcDo_SetDuration_BC ( int  playerId,
float  duration 
)

Broadcasts that sets timer duration for provided player.

Parameters
[in]playerIdPlayerId of target player.
[in]durationDuration of respawn timer.

Definition at line 188 of file SCR_RespawnTimerComponent.c.

◆ RpcDo_SetDurationAll_BC()

private void RpcDo_SetDurationAll_BC ( float  duration)

Broadcasts that sets timer duration for ALL players.

Parameters
[in]durationDuration of respawn timer.

Definition at line 197 of file SCR_RespawnTimerComponent.c.

◆ RpcDo_StartTimer_BC()

private void RpcDo_StartTimer_BC ( int  playerId,
WorldTimestamp  rplTime 
)

Broadcasts that starts timer for provided player.

Parameters
[in]playerIdPlayerId of target player.
[in]rplTimeSynchronised network time.

Definition at line 178 of file SCR_RespawnTimerComponent.c.

◆ RplLoad()

override bool RplLoad ( ScriptBitReader  reader)

Deserialise state of this component on the client.

Parameters
[in]reader
Returns

Definition at line 47 of file SCR_RespawnTimerComponent.c.

◆ RplSave()

override bool RplSave ( ScriptBitWriter  writer)

Serialise state of this component on the server.

Parameters
[in]writer
Returns

Definition at line 30 of file SCR_RespawnTimerComponent.c.

◆ SCR_RespawnTimerComponent()

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

Definition at line 333 of file SCR_RespawnTimerComponent.c.

◆ SetRespawnTime() [1/2]

void SetRespawnTime ( float  respawnTime)
Parameters
[in]respawnTime

Definition at line 227 of file SCR_RespawnTimerComponent.c.

◆ SetRespawnTime() [2/2]

void SetRespawnTime ( int  playerID,
float  respawnTime 
)
Parameters
[in]playerID
[in]respawnTime

Definition at line 91 of file SCR_RespawnTimerComponent.c.

◆ ~SCR_RespawnTimerComponent()

Definition at line 346 of file SCR_RespawnTimerComponent.c.

Variable Documentation

◆ m_mRespawnTimers

protected ref map<int, ref SCR_RespawnTimer> m_mRespawnTimers = new map<int, ref SCR_RespawnTimer>()

Map of respawn timers of individual players.
key: PlayerId of target player
val: RespawnTimer object

Definition at line 17 of file SCR_RespawnTimerComponent.c.

◆ m_RplComponent

protected RplComponent m_RplComponent

RplComponent attached to this component's owner entity.

Definition at line 20 of file SCR_RespawnTimerComponent.c.