Go to the source code of this file.
|
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 () |
|
◆ RESPAWN_TIMER_COMPONENT_DEBUG
#define RESPAWN_TIMER_COMPONENT_DEBUG |
◆ Attribute()
Must be attached to a GameMode.
◆ DrawDebugInfo()
protected void DrawDebugInfo |
( |
| ) |
|
◆ 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 |
( |
| ) |
|
◆ GetPlayerRemainingTime()
int GetPlayerRemainingTime |
( |
int |
playerID, |
|
|
float |
additionalTime = 0 |
|
) |
| |
◆ GetRespawnTime()
◆ IsMaster()
protected bool IsMaster |
( |
| ) |
|
◆ IsPlayerEnqueued()
bool IsPlayerEnqueued |
( |
int |
playerID | ) |
|
◆ OnPlayerDeleted()
override void OnPlayerDeleted |
( |
int |
playerId, |
|
|
IEntity |
player |
|
) |
| |
Called after a player gets deleted.
- Parameters
-
[in] | playerId | Player ID |
[in] | player | Player 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] | playerId | PlayerId of target player. |
[in] | duration | Duration 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] | duration | Duration 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] | playerId | PlayerId of target player. |
[in] | rplTime | Synchronised network time. |
Definition at line 178 of file SCR_RespawnTimerComponent.c.
◆ RplLoad()
override bool RplLoad |
( |
ScriptBitReader |
reader | ) |
|
◆ RplSave()
override bool RplSave |
( |
ScriptBitWriter |
writer | ) |
|
◆ SCR_RespawnTimerComponent()
void SCR_RespawnTimerComponent |
( |
IEntityComponentSource |
src, |
|
|
IEntity |
ent, |
|
|
IEntity |
parent |
|
) |
| |
◆ SetRespawnTime() [1/2]
void SetRespawnTime |
( |
float |
respawnTime | ) |
|
◆ SetRespawnTime() [2/2]
void SetRespawnTime |
( |
int |
playerID, |
|
|
float |
respawnTime |
|
) |
| |
◆ ~SCR_RespawnTimerComponent()
◆ m_mRespawnTimers
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 |