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

Go to the source code of this file.

Classes

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.
override bool RplSave (ScriptBitWriter writer)
override bool RplLoad (ScriptBitReader reader)
bool IsMaster ()
 Are we the master of this component's RplComponent node?
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 (notnull SCR_InstigatorContextData instigatorContextData)
override void OnPlayerDeleted (int playerId, IEntity player)
void DrawDebugInfo ()
override void EOnDiag (IEntity owner, float timeSlice)
override void OnPostInit (IEntity owner)
 Editable Mine.
override void OnDelete (IEntity owner)
void SCR_RespawnTimerComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
void ~SCR_RespawnTimerComponent ()

Variables

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

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

void DrawDebugInfo ( )
protected

Definition at line 256 of file SCR_RespawnTimerComponent.c.

◆ GetCanPlayerSpawn()

bool GetCanPlayerSpawn ( int playerID,
float additionalTime = 0 )
protected

Only relevant to server and local player.

Parameters
[in]playerID
[in]additionalTime
Returns

Definition at line 115 of file SCR_RespawnTimerComponent.c.

◆ GetCurrentTime()

WorldTimestamp GetCurrentTime ( )
protected
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 )
protected
Parameters
[in]playerID
[in]additionalTime
Returns

Definition at line 130 of file SCR_RespawnTimerComponent.c.

◆ IsPlayerEnqueued()

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

Definition at line 105 of file SCR_RespawnTimerComponent.c.

◆ OnDelete()

override void OnDelete ( IEntity owner)
protected

Definition at line 323 of file SCR_RespawnTimerComponent.c.

◆ OnPlayerDeleted()

override void OnPlayerDeleted ( int playerId,
IEntity player )
protected

Called after a player gets deleted.

Parameters
[in]playerIdPlayer ID
[in]playerPlayer entity

Definition at line 170 of file SCR_RespawnTimerComponent.c.

◆ OnPlayerKilled()

override void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Start respawn timer for provided entity if a player controlled it.

Parameters
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 148 of file SCR_RespawnTimerComponent.c.

◆ RplLoad()

override bool RplLoad ( ScriptBitReader reader)
protected

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

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 )
protected
Parameters
[in]src
[in]ent
[in]parent

Definition at line 335 of file SCR_RespawnTimerComponent.c.

◆ SetRespawnTime()

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

Definition at line 91 of file SCR_RespawnTimerComponent.c.

◆ ~SCR_RespawnTimerComponent()

void ~SCR_RespawnTimerComponent ( )
protected

Definition at line 348 of file SCR_RespawnTimerComponent.c.

Variable Documentation

◆ m_mRespawnTimers

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

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

RplComponent m_RplComponent
protected

RplComponent attached to this component's owner entity.

Definition at line 20 of file SCR_RespawnTimerComponent.c.