19 private bool m_bReady =
true;
20 private bool m_bWelcomeOpened;
21 private bool m_bWelcomeClosed;
28 private SCR_RespawnSystemComponent m_RespawnSystem;
33 super.OnPostInit(owner);
38 m_RespawnSystem = SCR_RespawnSystemComponent.GetInstance();
52 Print(
string.Format(
"%1 could not find %2!",
60 Print(
string.Format(
"%1 is not attached in %2 hierarchy! (%1 should be a child of %3!)",
70 SCR_ReconnectSynchronizationComponent reconnectComp = SCR_ReconnectSynchronizationComponent.Cast(owner.
FindComponent(SCR_ReconnectSynchronizationComponent));
75 if (!welcomeScreenComp)
109 if (!SCR_DeployMenuMain.GetDeployMenu())
112 SCR_DeployMenuMain.OpenDeployMenu();
117 SCR_DeployMenuMain.CloseDeployMenu();
156 s_OnMenuClose.Invoke();
162 if (!m_PlyFactionAffil)
173 if (!m_bWelcomeClosed)
177 bool hasDeadEntity =
false;
180 hasDeadEntity = character.GetCharacterController().IsDead();
184 (!hasEntity || hasDeadEntity) &&
196 if (m_bWelcomeClosed || hasEntity)
199 bool hasDeadEntity =
false;
202 hasDeadEntity = character.GetCharacterController().IsDead();
206 (!hasEntity || hasDeadEntity) &&
216 if (m_SpawnLogic && m_SpawnLogic.GetWaitForSpawnPoints())
230 if (!controlledEntity || controlledEntity.
IsDeleted())
236 const float delay = m_SpawnLogic.GetDeployMenuOpenDelay() * 1000.0;
247 m_RespawnSystem.DestroyLoadingPlaceholder();
249 m_DeployMenuSystem.SetReady(
true);
255 m_bWelcomeClosed =
true;
269 SCR_DeployMenuMain.CloseDeployMenu();
275 m_DeployMenuSystem.SetReady(
false);
287 return s_OnMenuClose;
294 delete s_OnMenuClose;
296 if (m_DeployMenuSystem)
297 m_DeployMenuSystem.Unregister(
this);
300 m_RespawnSystem.DestroyLoadingPlaceholder();
302 super.OnDelete(owner);
328 if (!m_PlyFactionAffil)
331 const FactionKey factionKey = m_PlyFactionAffil.GetAffiliatedFactionKey();
332 if (factionKey.IsEmpty())
368 if (sp.
GetFactionKey() != m_PlyFactionAffil.GetAffiliatedFactionKey())
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
SCR_FastTravelComponentClass m_PlayerController
SCR_PlayerDeployMenuHandlerComponentClass m_RespawnComponent
Component responsible for deploy menu management.
RplId GetLastUsedSpawnPointId()
bool CanOpenWelcomeScreen()
bool IsWelcomeScreenOpen()
void OnPlayerSpawnPointAdded(SCR_SpawnPoint sp)
void SetNotReady(SCR_SpawnRequestComponent requestComponent, SCR_ESpawnResult response)
void OnPlayerFactionAssigned(SCR_PlayerFactionAffiliationComponent component, Faction previous, Faction current)
ScriptInvokerBase< OnDeployMenuOpenDelegate > OnDeployMenuOpenInvoker
void HandleWaitForSpawnPoints()
func OnDeployMenuOpenDelegate
func OnDeployMenuCloseDelegate
RplId m_iLastUsedSpawnPoint
void SetLastUsedSpawnPointId(RplId id)
void CheckSpawnsOrWait(const FactionKey factionKey)
bool HasPlayableFaction()
ScriptInvokerBase< OnDeployMenuCloseDelegate > OnDeployMenuCloseInvoker
void CloseWelcomeScreen()
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
proto external GenericComponent FindComponent(typename typeName)
proto external Managed FindComponent(typename typeName)
proto external BaseWorld GetWorld()
proto external bool IsDeleted()
Replication item identifier.
Spawn point entity defines positions on which players can possibly spawn.
proto external GenericEntity GetOwner()
Get owner entity.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto external PlayerController GetPlayerController()
proto external EParticleEffectState GetState()
proto external int GetPlayerId()
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.