44 RplComponent rplComp = RplComponent.Cast(owner.
FindComponent(RplComponent));
45 if (!
GetGame().InPlayMode() || !rplComp || rplComp.IsProxy())
51 if (
GetGame().GetBackendApi().GetRunningDSConfig(config))
86 array<UUID> expired = {};
93 expired.Insert(identity);
96 if (!expired.IsEmpty())
98 foreach (
UUID identity : expired)
144 return GetGame().GetPlayerManager().GetPlayerControlledEntity(playerId) != null;
152 data.m_ReservedEntity =
GetGame().GetPlayerManager().GetPlayerControlledEntity(playerId);
164 return character && !character.GetCharacterController().IsDead();
171 return data.m_ValidUntil &&
data.m_ValidUntil.Less(timestamp);
181 auto respawn = SCR_RespawnSystemComponent.GetInstance();
183 respawn.OnPlayerEntityCleanup_S(
data.m_ReservedEntity);
185 RplComponent.DeleteRplEntity(
data.m_ReservedEntity,
false);
200 if (playerFactionComp)
204 SCR_RespawnSystemComponent.GetInstance().EmitPlayerEntityChange_S(playerId, null, character);
206 SCR_ReconnectSynchronizationComponent syncComp = SCR_ReconnectSynchronizationComponent.Cast(playerController.FindComponent(SCR_ReconnectSynchronizationComponent));
208 syncComp.CreateReconnectDialog();
ArmaReforgerScripted GetGame()
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Get all prefabs that have the spawner data
void SCR_FactionManager(IEntitySource src, IEntity parent)
class SCR_ReconnectData EntityEditorProps(category:"GameScripted/GameMode", description:"")
proto external Managed FindComponent(typename typeName)
ref SCR_DSOperating operating
Core component to manage SCR_EditorManagerEntity.
void OnPlayerSpawn(int playerID, IEntity controlledEntity)
void SetInitialMainEntity(notnull IEntity entity)
bool SetFaction_S(Faction faction)
void OnPostInit(IEntity owner)
void CheckExpiery()
Remove any data that has exceeded the max reconnect time window.
bool IsDataExpired(notnull SCR_ReconnectData data, WorldTimestamp timestamp)
Check if the reconnect time window has been exceeded.
bool HandlePlayerReconnect(int playerId)
static SCR_ReconnectComponent s_Instance
bool HandlePlayerDisconnect(int playerId, KickCauseCode cause)
Returns true if the players entity has been taken over for reconnection.
static SCR_ReconnectComponent GetInstance()
void HandleDataExpiery(notnull SCR_ReconnectData data)
Data has expired, handle graceful removal of presence in the world.
int GetReconnectTimeout()
For how many seconds a player can reconnect before the controlled character is removed.
ref map< UUID, ref SCR_ReconnectData > m_mReconnectData
void UpdateExpieryCheck()
notnull SCR_ReconnectData StoreData(int playerId)
Collect information relevant to reapply after reconnection to player controller / character.
void EOnInit(IEntity owner)
void ApplyData(int playerId, notnull SCR_ReconnectData data)
Apply still relevant data back on successful reconnect.
bool IsDataRelevant(notnull SCR_ReconnectData data)
Returns true if the data is relevant for reconnect and we should store it in the system.
Data class for reconnecting players.
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
EntityEvent
Various entity events.
proto external PlayerController GetPlayerController()
KickCauseGroup2
Extends KickCauseGroup by adding game-specific groups.