Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_RespawnComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode", description: "Communicator for RespawnSystemComponent. Should be attached to PlayerController.")]
3 {
4 }
5 
6 //#define RESPAWN_COMPONENT_DIAG
7 // This define can be used to enable RespawnComponent diag menu which can be accessed in-game
8 // via the Game Diag (Cmd+Alt) -> Network -> Respawn System Diag
9 
10 //#define RESPAWN_COMPONENT_VERBOSE
11 // Can be used to enable verbose logging of RPCs sent via SCR_RespawnComponent switch,
12 // which can be especially useful when debugging a dedicated server or so.
13 
14 // #define RESPAWN_COMPONENT_DIAG
15 // #define RESPAWN_COMPONENT_VERBOSE
16 // #define RESPAWN_COMPONENT_LOCKS_VERBOSE
17 
19 enum ERespawnSelectionResult
20 {
21  OK = 0,
22  ERROR = 1,
23 
24  ERROR_FORBIDDEN = 2,
25 }
26 
29 class SCR_RespawnComponent : RespawnComponent
30 {
32  protected PlayerController m_PlayerController;
33 
35  protected RplComponent m_RplComponent;
36  // RespawnSystemComponent - has to be attached on a gameMode entity
37 
40  protected ref map<typename, SCR_SpawnRequestComponent> m_mRequestComponents = new map<typename, SCR_SpawnRequestComponent>();
41 
42  private static ref ScriptInvokerVoid s_OnLocalPlayerSpawned;
43 
44  //------------------------------------------------------------------------------------------------
47  static ScriptInvokerVoid SGetOnLocalPlayerSpawned()
48  {
49  if (!s_OnLocalPlayerSpawned)
50  s_OnLocalPlayerSpawned = new ScriptInvokerVoid();
51 
52  return s_OnLocalPlayerSpawned;
53  }
54 
55  // ON RESPAWN READY (notification from server to e.g. open respawn menu)
57 
58  //------------------------------------------------------------------------------------------------
61  {
63  }
64 
65  // ON CAN RESPAWN REQUEST
67 
68  //------------------------------------------------------------------------------------------------
71  {
73  }
74 
76 
77  //------------------------------------------------------------------------------------------------
80  {
82  }
83 
84  // ON CAN RESPAWN RESPONSE
86 
87  //------------------------------------------------------------------------------------------------
91  {
93  }
94 
96 
97  //------------------------------------------------------------------------------------------------
101  {
103  }
104 
105  // ON RESPAWN REQUEST
107 
108  //------------------------------------------------------------------------------------------------
111  {
113  }
114 
116 
117  //------------------------------------------------------------------------------------------------
120  {
122  }
123 
124  // ON RESPAWN RESPONSE
126 
127  //------------------------------------------------------------------------------------------------
130  {
132  }
133 
135 
136  //------------------------------------------------------------------------------------------------
139  {
141  }
142 
143  //------------------------------------------------------------------------------------------------
144  // ON FINALIZE START
146  //------------------------------------------------------------------------------------------------
151  {
153  }
154 
155  #ifdef DEBUGUI_RESPAWN_REQUEST_COMPONENT_DIAG
156  static bool s_DebugRegistered;
157  #endif
158 
159  //------------------------------------------------------------------------------------------------
162  {
163  PlayerController playerController = GetGame().GetPlayerController();
164  if (playerController)
165  return SCR_RespawnComponent.Cast(playerController.FindComponent(SCR_RespawnComponent));
166  else
167  return null;
168  }
169 
170  //------------------------------------------------------------------------------------------------
174  static SCR_RespawnComponent SGetLocalRespawnComponent()
175  {
176  PlayerController playerController = GetGame().GetPlayerController();
177  if (!playerController)
178  return null;
179 
180  return SCR_RespawnComponent.Cast(playerController.GetRespawnComponent());
181  }
182 
183  //------------------------------------------------------------------------------------------------
189  static SCR_RespawnComponent SGetPlayerRespawnComponent(int playerId)
190  {
191  PlayerController playerController = GetGame().GetPlayerManager().GetPlayerController(playerId);
192  if (!playerController)
193  return null;
194 
195  return SCR_RespawnComponent.Cast(playerController.GetRespawnComponent());
196  }
197 
198  //------------------------------------------------------------------------------------------------
200  RplComponent GetRplComponent()
201  {
202  return m_RplComponent;
203  }
204 
205  //------------------------------------------------------------------------------------------------
206  [Obsolete("Use SCR_PlayerFactionAffiliationComponent instead!")]
208 
209  //------------------------------------------------------------------------------------------------
210  [Obsolete("Use SCR_PlayerLoadoutComponent instead!")]
212 
213  //------------------------------------------------------------------------------------------------
214  [Obsolete("Use SCR_RespawnComponent.RequestSpawn directly instead!")]
216 
217  //------------------------------------------------------------------------------------------------
218  [Obsolete("Use SCR_PlayerLoadoutComponent instead!")]
220 
221  //------------------------------------------------------------------------------------------------
222  [Obsolete("Use SCR_PlayerFactionAffiliationComponent instead!")]
223  bool RequestPlayerFaction(Faction faction);
224 
225  //------------------------------------------------------------------------------------------------
226  [Obsolete("Use SCR_RespawnComponent.RequestSpawn directly instead!")]
227  bool RequestPlayerSpawnPoint(SCR_SpawnPoint spawnPoint);
228 
229  //------------------------------------------------------------------------------------------------
232  {
233  if (!m_PlayerController)
234  return;
235 
236  GenericEntity controlledEntity = GenericEntity.Cast(m_PlayerController.GetControlledEntity());
237  if (!controlledEntity)
238  return;
239 
240  CharacterControllerComponent characterController = CharacterControllerComponent.Cast(controlledEntity.FindComponent(CharacterControllerComponent));
241  if (characterController)
242  {
243  characterController.ForceDeath();
244  return;
245  }
246  }
247 
248  //------------------------------------------------------------------------------------------------
249  [Obsolete("Use SCR_PlayerLoadoutComponent instead!")]
250  protected void RequestPlayerLoadoutIndex(int loadoutIndex);
251 
252  //------------------------------------------------------------------------------------------------
253  [Obsolete("Use SCR_PlayerFactionAffiliationComponent instead!")]
254  protected void RequestPlayerFactionIndex(int factionIndex);
255 
256  //------------------------------------------------------------------------------------------------
257  [Obsolete("Use SCR_RespawnComponent.RequestSpawn directly instead!")]
258  protected void RequestPlayerSpawnPointIdentity(RplId spawnPointIdentity);
259 
260  //------------------------------------------------------------------------------------------------
264  {
266  }
267 
268  //------------------------------------------------------------------------------------------------
269  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
270  protected void Rpc_NotifyReadyForSpawn_O()
271  {
272  #ifdef _ENABLE_RESPAWN_LOGS
273  Print(string.Format("%1::Rpc_NotifyReadyForSpawn_O(playerId: %2)", Type().ToString(), GetPlayerController().GetPlayerId()), LogLevel.NORMAL);
274  #endif
275 
276  GetOnRespawnReadyInvoker_O().Invoke();
277 
278  #ifdef ENABLE_DIAG
279  if (Diag_IsCLISpawnEnabled())
280  Diag_RequestCLISpawn();
281  #endif
282  }
283 
284  //------------------------------------------------------------------------------------------------
285  [Obsolete("Unsupported")]
286  void RequestQuickRespawn();
287 
288  //------------------------------------------------------------------------------------------------
289  [Obsolete("Use SCR_RespawnComponent.RequestSpawn instead.")]
290  void RequestRespawn();
291 
292  //------------------------------------------------------------------------------------------------
293  #ifdef ENABLE_DIAG
294  override void OnDiag(IEntity owner, float timeSlice)
295  {
296  if (!DiagMenu.GetBool(SCR_DebugMenuID.DEBUGUI_RESPAWN_COMPONENT_DIAG))
297  return;
298 
299  foreach (SCR_SpawnRequestComponent requestComponent : m_mRequestComponents)
300  {
301  requestComponent.DrawDiag();
302  }
303  }
304  #endif
305 
306  //------------------------------------------------------------------------------------------------
307  override void OnPostInit(IEntity owner)
308  {
309  #ifdef ENABLE_DIAG
310  ConnectToDiagSystem(owner);
311  DiagMenu.RegisterBool(SCR_DebugMenuID.DEBUGUI_RESPAWN_COMPONENT_DIAG, "", "Respawn Component", "GameMode");
312  DiagMenu.RegisterBool(SCR_DebugMenuID.DEBUGUI_RESPAWN_COMPONENT_TIME, "", "Respawn Time Measures", "GameMode");
313  #endif
314 
315  m_PlayerController = PlayerController.Cast(owner);
316  if (!m_PlayerController)
317  {
318  Print("SCR_RespawnComponent must be attached to PlayerController!", LogLevel.ERROR);
319  return;
320  }
321 
322  SCR_SpawnLockComponent lockComponent = SCR_SpawnLockComponent.Cast(owner.FindComponent(SCR_SpawnLockComponent));
323  if (!lockComponent)
324  {
325  Print(string.Format("%1 does not have a %2 attached!",
326  Type().ToString(), SCR_SpawnLockComponent),
327  LogLevel.ERROR);
328  }
329 
330  m_RplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
332 
334  if (!gameMode)
335  {
336  Print("No game mode found in the world, SCR_RespawnComponent will not function correctly!", LogLevel.ERROR);
337  return;
338  }
339  }
340 
341  //------------------------------------------------------------------------------------------------
342  override void OnDelete(IEntity owner)
343  {
344  DisconnectFromDiagSystem(owner);
345 
346  super.OnDelete(owner);
347  }
348 
349  //------------------------------------------------------------------------------------------------
365  {
366  SCR_SpawnRequestComponent requestComponent = GetRequestComponent(data);
367  if (!requestComponent)
368  {
369  Print(string.Format("%1::RequestRespawn(data: %2) could not find associated %3!",
370  Type().ToString(), data, SCR_SpawnRequestComponent), LogLevel.ERROR);
371  return false;
372  }
373 
374  return requestComponent.RequestRespawn(data);
375  }
376 
377  //------------------------------------------------------------------------------------------------
393  {
394  SCR_SpawnRequestComponent requestComponent = GetRequestComponent(data);
395  if (!requestComponent)
396  {
397  Print(string.Format("%1::RequestRespawn(data: %2) could not find associated %3!",
398  Type().ToString(), data, SCR_SpawnRequestComponent), LogLevel.ERROR);
399  return false;
400  }
401 
402  return requestComponent.CanRequestRespawn(data);
403  }
404 
405  //------------------------------------------------------------------------------------------------
408  protected void RegisterRespawnRequestComponents(IEntity owner)
409  {
410  array<GenericComponent> components = {};
411  FindComponents(SCR_SpawnRequestComponent, components);
412  foreach (GenericComponent genericComponent : components)
413  {
414  SCR_SpawnRequestComponent requestComponent = SCR_SpawnRequestComponent.Cast(genericComponent);
415  typename dataType = requestComponent.GetDataType();
416  if (m_mRequestComponents.Contains(dataType))
417  {
418  Debug.Error(string.Format("Cannot register %1! %2 already contains a mapping for %3 data type! (old: %4)",
419  requestComponent.Type().ToString(),
420  Type().ToString(),
421  dataType,
422  m_mRequestComponents[dataType].Type().ToString()));
423 
424  continue;
425  }
426 
427  m_mRequestComponents.Insert(dataType, requestComponent);
428 
429  #ifdef _ENABLE_RESPAWN_LOGS
430  string typeName = "null";
431  if (dataType != typename.Empty)
432  typeName = dataType.ToString();
433  Print(string.Format("%1::RegisterRespawnRequestComponents() registered %2 component for requests of %3 type.", Type().ToString(),
434  requestComponent.Type().ToString(),
435  typeName), LogLevel.NORMAL);
436  #endif
437  }
438  }
439 
440  //------------------------------------------------------------------------------------------------
444  protected SCR_SpawnRequestComponent GetRequestComponent(SCR_SpawnData data)
445  {
446  if (!data)
447  return null;
448 
449  SCR_SpawnRequestComponent component;
450  m_mRequestComponents.Find(data.Type(), component);
451  return component;
452  }
453 
454  #ifdef ENABLE_DIAG
455  //------------------------------------------------------------------------------------------------
458  static bool Diag_IsCLISpawnEnabled()
459  {
460  return System.IsCLIParam("autodeployFaction") || System.IsCLIParam("autodeployLoadout") ||
461  System.IsCLIParam("tdmf") || System.IsCLIParam("tdml");
462  }
463 
464  //------------------------------------------------------------------------------------------------
466  void Diag_RequestCLISpawn()
467  {
468  int factionId = -1;
469  string fs;
470  if (System.GetCLIParam("autodeployFaction", fs) || System.GetCLIParam("tdmf", fs))
471  {
472  Faction factionFromKey = GetGame().GetFactionManager().GetFactionByKey(fs);
473 
474  if (factionFromKey != null)
475  factionId = GetGame().GetFactionManager().GetFactionIndex(factionFromKey);
476  else
477  factionId = fs.ToInt();
478  }
479 
480  int loadoutId = -1;
481  string ls;
482  if (System.GetCLIParam("autodeployLoadout", fs) || System.GetCLIParam("tdml", ls))
483  {
484  SCR_BasePlayerLoadout loadoutFromKey = GetGame().GetLoadoutManager().GetLoadoutByName(ls);
485 
486  if (loadoutFromKey != null)
487  loadoutId = GetGame().GetLoadoutManager().GetLoadoutIndex(loadoutFromKey);
488  else
489  loadoutId = ls.ToInt();
490  }
491 
492  Rpc(Rpc_RequestCLISpawn_S, factionId, loadoutId);
493  }
494 
495  //------------------------------------------------------------------------------------------------
496  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
497  protected void Rpc_RequestCLISpawn_S(int factionIdx, int loadoutIdx)
498  {
499  int ok = 0;
500  Faction faction = GetGame().GetFactionManager().GetFactionByIndex(factionIdx);
501  SCR_BasePlayerLoadout loadout = GetGame().GetLoadoutManager().GetLoadoutByIndex(loadoutIdx);
502 
503  // backtrack faction index from loadout, if possible
504  if (!faction && loadout)
505  {
507  if (factionLoadout)
508  faction = GetGame().GetFactionManager().GetFactionByKey(factionLoadout.GetFactionKey());
509  }
510 
511  // select loadout at random, faction was given
512  if (faction && !loadout)
513  loadout = GetGame().GetLoadoutManager().GetRandomFactionLoadout(faction);
514 
516  if (factionComponent)
517  {
518  if (factionComponent.RequestFaction(faction))
519  ok |= (1 << 1);
520  }
521 
523  if (loadoutComponent)
524  {
525  if (loadoutComponent.RequestLoadout(loadout))
526  ok |= (1 << 2);
527  }
528 
529  if (loadout)
530  {
531  ResourceName resource = loadout.GetLoadoutResource();
532  SCR_SpawnPoint spawnPoint = SCR_SpawnPoint.GetSpawnPointsForFaction(faction.GetFactionKey()).GetRandomElement();
533  if (!resource.IsEmpty() && spawnPoint)
534  {
535  SCR_SpawnPointSpawnData spsd = new SCR_SpawnPointSpawnData(resource, spawnPoint.GetRplId());
536  if (RequestSpawn(spsd))
537  ok |= (1 << 3);
538  }
539  }
540 
541  Rpc(Rpc_ResponseCLISpawn_O, ok);
542  }
543 
544  //------------------------------------------------------------------------------------------------
545  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
546  protected void Rpc_ResponseCLISpawn_O(int response)
547  {
548  bool faction = (response & (1 << 1));
549  bool loadout = (response & (1 << 2));
550  bool spawn = (response & (1 << 3));
551 
552  string msg = "Server request to spawn using diagnostics mode processed (-autodeployFaction/-autodeployLoadout), result:\n\tFaction: %1, Loadout: %2, Spawn: %3";
553 
554  string fs = "ERR";
555  if (faction)
556  fs = "OK";
557 
558  string ls = "ERR";
559  if (loadout)
560  ls = "OK";
561 
562  string ss = "ERR";
563  if (spawn)
564  ss = "OK";
565 
566  Print(string.Format(msg, fs, ls, ss), LogLevel.NORMAL);
567  }
568 
569  #endif
570 
571  //------------------------------------------------------------------------------------------------
572  // constructor
576  void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
577  {
578  }
579 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_PlayerLoadoutComponent
Definition: SCR_PlayerLoadoutComponent.c:16
SCR_BaseGameMode
Definition: SCR_BaseGameMode.c:137
SCR_RespawnComponent
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_RespawnComponent.c:576
GetOnCanRespawnResponseInvoker_S
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_S()
Definition: SCR_RespawnComponent.c:100
RequestPlayerFactionIndex
protected void RequestPlayerFactionIndex(int factionIndex)
OK
SCR_RespawnComponentClass OK
Result code for request/assign response.
Definition: ECanBeEquippedResult.c:14
Rpc_NotifyReadyForSpawn_O
protected void Rpc_NotifyReadyForSpawn_O()
Definition: SCR_RespawnComponent.c:270
OnCanRespawnRequestInvoker
ScriptInvokerBase< CanRespawnRequestDelegate > OnCanRespawnRequestInvoker
Definition: SCR_SpawnCallbacks.c:13
RequestClearPlayerLoadout
bool RequestClearPlayerLoadout()
GetInstance
SCR_TextsTaskManagerComponentClass ScriptComponentClass GetInstance()
Definition: SCR_TextsTaskManagerComponent.c:50
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
OnDelete
override void OnDelete(IEntity owner)
Definition: SCR_RespawnComponent.c:342
m_OnRespawnRequestInvoker_O
protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_O
Definition: SCR_RespawnComponent.c:106
RequestRespawn
void RequestRespawn()
Sends a respawn request based on assigned loadout and selected spawn point.
Definition: SCR_DeployMenuBase.c:694
m_PlayerController
SCR_RespawnComponentClass m_PlayerController
Parent entity (owner) - has to be a player controller for RPCs.
RequestPlayerSpawnPoint
bool RequestPlayerSpawnPoint(SCR_SpawnPoint spawnPoint)
loadout
string loadout
Definition: SCR_ArsenalManagerComponent.c:2
GetOnCanRespawnResponseInvoker_O
OnCanRespawnResponseInvoker GetOnCanRespawnResponseInvoker_O()
Definition: SCR_RespawnComponent.c:90
m_OnCanRespawnResponseInvoker_O
protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_O
Definition: SCR_RespawnComponent.c:85
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition: SCR_SpawnPoint.c:27
GenericEntity
SCR_GenericBoxEntityClass GenericEntity
GetRplComponent
RplComponent GetRplComponent()
Returns the replication component associated to this entity.
Definition: SCR_RespawnComponent.c:200
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
GetOnRespawnResponseInvoker_S
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_S()
Definition: SCR_RespawnComponent.c:138
GetOnRespawnRequestInvoker_O
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_O()
Definition: SCR_RespawnComponent.c:110
RequestClearPlayerSpawnPoint
void RequestClearPlayerSpawnPoint()
GetOnRespawnRequestInvoker_S
OnRespawnRequestInvoker GetOnRespawnRequestInvoker_S()
Definition: SCR_RespawnComponent.c:119
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition: SCR_BaseGameModeComponent.c:15
SCR_SpawnData
Definition: SCR_SpawnData.c:9
ERROR
SCR_RespawnComponentClass ERROR
m_OnRespawnRequestInvoker_S
protected ref OnRespawnRequestInvoker m_OnRespawnRequestInvoker_S
Definition: SCR_RespawnComponent.c:115
m_OnRespawnReadyInvoker_O
protected ref OnRespawnReadyInvoker m_OnRespawnReadyInvoker_O
Definition: SCR_RespawnComponent.c:56
OnRespawnReadyInvoker
ScriptInvokerBase< RespawnReadyDelegate > OnRespawnReadyInvoker
Definition: SCR_SpawnCallbacks.c:21
RequestPlayerFaction
bool RequestPlayerFaction(Faction faction)
RequestQuickRespawn
void RequestQuickRespawn()
SCR_FactionPlayerLoadout
Definition: SCR_PlayerFactionLoadout.c:2
OnRespawnRequestInvoker
ScriptInvokerBase< RespawnRequestDelegate > OnRespawnRequestInvoker
Definition: SCR_SpawnCallbacks.c:3
m_OnCanRespawnRequestInvoker_S
protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_S
Definition: SCR_RespawnComponent.c:75
m_OnRespawnFinalizeBeginInvoker_O
protected ref OnRespawnRequestInvoker m_OnRespawnFinalizeBeginInvoker_O
Definition: SCR_RespawnComponent.c:145
m_OnCanRespawnResponseInvoker_S
protected ref OnCanRespawnResponseInvoker m_OnCanRespawnResponseInvoker_S
Definition: SCR_RespawnComponent.c:95
SCR_SpawnPointSpawnData
Definition: SCR_SpawnPointSpawnData.c:2
OnDiag
event protected void OnDiag(IEntity owner, float timeslice)
SCR_RespawnComponentClass
Definition: SCR_RespawnComponent.c:2
RequestPlayerLoadoutIndex
protected void RequestPlayerLoadoutIndex(int loadoutIndex)
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_RespawnComponent.c:307
m_OnRespawnResponseInvoker_O
protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_O
Definition: SCR_RespawnComponent.c:125
RequestPlayerSpawnPointIdentity
protected void RequestPlayerSpawnPointIdentity(RplId spawnPointIdentity)
OnRespawnResponseInvoker
ScriptInvokerBase< RespawnResponseDelegate > OnRespawnResponseInvoker
Definition: SCR_SpawnCallbacks.c:7
RequestClearPlayerFaction
bool RequestClearPlayerFaction()
NotifyReadyForSpawn_S
void NotifyReadyForSpawn_S()
Definition: SCR_RespawnComponent.c:263
RequestPlayerLoadout
bool RequestPlayerLoadout(SCR_BasePlayerLoadout loadout)
GetRequestComponent
protected SCR_SpawnRequestComponent GetRequestComponent(SCR_SpawnData data)
Definition: SCR_RespawnComponent.c:444
ERROR_FORBIDDEN
SCR_RespawnComponentClass ERROR_FORBIDDEN
Can happen if we are setting a loadout from a faction to which we do not belong to or similar.
Faction
Definition: Faction.c:12
GetOnCanRespawnRequestInvoker_S
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_S()
Definition: SCR_RespawnComponent.c:79
m_OnRespawnResponseInvoker_S
protected ref OnRespawnResponseInvoker m_OnRespawnResponseInvoker_S
Definition: SCR_RespawnComponent.c:134
SCR_PlayerFactionAffiliationComponent
Definition: SCR_PlayerFactionAffiliationComponent.c:16
GetOnRespawnReadyInvoker_O
OnRespawnReadyInvoker GetOnRespawnReadyInvoker_O()
Definition: SCR_RespawnComponent.c:60
ScriptInvokerVoid
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
Definition: SCR_ScriptInvokerHelper.c:9
CanSpawn
bool CanSpawn(SCR_SpawnData data)
Definition: SCR_RespawnComponent.c:392
GetOnCanRespawnRequestInvoker_O
OnCanRespawnRequestInvoker GetOnCanRespawnRequestInvoker_O()
Definition: SCR_RespawnComponent.c:70
GetOnRespawnResponseInvoker_O
OnRespawnResponseInvoker GetOnRespawnResponseInvoker_O()
Definition: SCR_RespawnComponent.c:129
m_mRequestComponents
protected ref map< typename, SCR_SpawnRequestComponent > m_mRequestComponents
Definition: SCR_RespawnComponent.c:40
RequestSpawn
bool RequestSpawn(SCR_SpawnData data)
Definition: SCR_RespawnComponent.c:364
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
OnCanRespawnResponseInvoker
ScriptInvokerBase< CanRespawnResponseDelegate > OnCanRespawnResponseInvoker
Definition: SCR_SpawnCallbacks.c:17
m_OnCanRespawnRequestInvoker_O
protected ref OnCanRespawnRequestInvoker m_OnCanRespawnRequestInvoker_O
Definition: SCR_RespawnComponent.c:66
RequestPlayerSuicide
void RequestPlayerSuicide()
Definition: SCR_RespawnComponent.c:231
m_RplComponent
protected RplComponent m_RplComponent
Parent entity's rpl component.
Definition: SCR_RespawnComponent.c:35
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition: DebugMenuID.c:3
RegisterRespawnRequestComponents
protected void RegisterRespawnRequestComponents(IEntity owner)
Definition: SCR_RespawnComponent.c:408
GetOnRespawnFinalizeBeginInvoker_O
OnRespawnRequestInvoker GetOnRespawnFinalizeBeginInvoker_O()
Definition: SCR_RespawnComponent.c:150
SCR_BasePlayerLoadout
Definition: SCR_BasePlayerLoadout.c:2
Obsolete
RespawnSystemComponentClass GameComponentClass Obsolete()] proto external GenericEntity DoSpawn(string prefab
RespawnSystemComponent should be attached to a gamemode to handle player spawning and respawning.
GetPlayerId
proto external int GetPlayerId()
Definition: SCR_SpawnRequestComponent.c:39
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
RespawnComponentClass
Definition: RespawnComponent.c:12