Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SpawnRequestComponent.c
Go to the documentation of this file.
1 class SCR_SpawnRequestComponentClass : ScriptComponentClass
2 {
3  static override bool DependsOn(string className)
4  {
5  if (className == "SCR_RespawnComponentClass")
6  return true;
7 
8  return false;
9  }
10 }
11 
20 class SCR_SpawnRequestComponent : ScriptComponent
21 {
24  private SCR_SpawnLockComponent m_LockComponent;
25  private RplComponent m_RplComponent;
26 
27  private SCR_SpawnHandlerComponent m_HandlerComponent;
28  private bool m_bIsPreloading;
29 
30  //------------------------------------------------------------------------------------------------
32  PlayerController GetPlayerController()
33  {
34  return m_PlayerController;
35  }
36 
37  //------------------------------------------------------------------------------------------------
40  {
41  return m_PlayerController.GetPlayerId();
42  }
43 
44  //------------------------------------------------------------------------------------------------
46  {
47  return m_RespawnComponent;
48  }
49 
50  //------------------------------------------------------------------------------------------------
52  SCR_SpawnHandlerComponent GetHandlerComponent()
53  {
54  return m_HandlerComponent;
55  }
56 
57  //------------------------------------------------------------------------------------------------
59  protected SCR_SpawnLockComponent GetLock()
60  {
61  return m_LockComponent;
62  }
63 
68 
69  //------------------------------------------------------------------------------------------------
72  typename GetHandlerType()
73  {
74  return SCR_SpawnHandlerComponent;
75  }
76 
77  //------------------------------------------------------------------------------------------------
80  typename GetDataType()
81  {
82  return SCR_SpawnData;
83  }
84 
85  //------------------------------------------------------------------------------------------------
86  protected bool IsOwner()
87  {
88  return !m_RplComponent || m_RplComponent.IsOwner();
89  }
90 
91  //------------------------------------------------------------------------------------------------
92  protected bool IsProxy()
93  {
94  return m_RplComponent && m_RplComponent.IsProxy();
95  }
96 
97  //------------------------------------------------------------------------------------------------
100  protected override void OnPostInit(IEntity owner)
101  {
102  super.OnPostInit(owner);
103 
104  if (!GetGame().InPlayMode())
105  return;
106 
108  if (!m_PlayerController)
109  {
110  Print(string.Format("%1 is not attached in %2 hierarchy! (%1 should be a child of %3!)",
111  Type().ToString(), SCR_PlayerController, SCR_RespawnComponent),
112  LogLevel.ERROR);
113  }
114 
115  m_RplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
116  if (!m_RplComponent)
117  {
118  Print(string.Format("%1 could not find %2!",
119  Type().ToString(), RplComponent),
120  LogLevel.ERROR);
121  }
122 
123  m_RespawnComponent = SCR_RespawnComponent.Cast(owner.FindComponent(SCR_RespawnComponent));
124  if (!m_RespawnComponent)
125  {
126  Print(string.Format("%1 could not find %2!",
127  Type().ToString(), SCR_RespawnComponent),
128  LogLevel.ERROR);
129  }
130 
131  m_LockComponent = SCR_SpawnLockComponent.Cast(owner.FindComponent(SCR_SpawnLockComponent));
132  if (!m_LockComponent)
133  {
134  Print(string.Format("%1 could not find %2!",
135  Type().ToString(), SCR_SpawnLockComponent),
136  LogLevel.ERROR);
137  }
138 
139  SCR_RespawnSystemComponent respawnSystem = SCR_RespawnSystemComponent.GetInstance();
140  if (!respawnSystem)
141  {
142  Print(string.Format("%1 could not find %2!",
143  Type().ToString(), SCR_RespawnSystemComponent),
144  LogLevel.ERROR);
145  }
146 
147  m_HandlerComponent = SCR_SpawnHandlerComponent.Cast(respawnSystem.FindComponent(GetHandlerType()));
148  if (!m_HandlerComponent)
149  {
150  Print(string.Format("%1 could not find %2!",
151  Type().ToString(), GetHandlerType().ToString()),
152  LogLevel.ERROR);
153  }
154  }
155 
156  //------------------------------------------------------------------------------------------------
161  {
162  #ifdef _ENABLE_RESPAWN_LOGS
163  Print(string.Format("%1::CanRequestRespawn(data: %2)", Type().ToString(), data), LogLevel.NORMAL);
164  #endif
165 
166  SCR_SpawnLockComponent lock = GetLock();
167  if (lock && !lock.TryLock(this, false))
168  {
169  //Debug.Error("Caught request on locked player!"); //~ No need to error as it simply returns on locked. As requests can be made in various situations
170  return false;
171  }
172 
173  // Notify that request began
174  if (IsOwner())
175  m_RespawnComponent.GetOnCanRespawnRequestInvoker_O().Invoke(this, data);
176 
177  if (!IsProxy())
178  m_RespawnComponent.GetOnCanRespawnRequestInvoker_S().Invoke(this, data);
179 
180  // Now that we ensured that there will be no more outgoing requests,
181  // store the user constructed data to be passed onto response later on
183 
184  // Send the ask request
186 
187  // Notify self on local failure, early-reject.
188  if (!success)
190 
191  return success;
192  }
193 
194  //------------------------------------------------------------------------------------------------
199  {
200  Debug.Error("Not implemented!");
201  return false;
202  }
203 
204  //------------------------------------------------------------------------------------------------
209  {
210  #ifdef _ENABLE_RESPAWN_LOGS
211  Print(string.Format("%1::ProcessCanRequest_S(data: %2)", Type().ToString(), data), LogLevel.NORMAL);
212  #endif
213 
214  // Server lock
215  SCR_SpawnLockComponent lock = GetLock();
216  if (lock && !lock.TryLock(this, true))
217  {
218  Debug.Error("Caught request on locked player!");
219  return;
220  }
221 
222  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
223  respawnComponent.GetOnCanRespawnRequestInvoker_S().Invoke(this, data);
224 
225  // Find handler
226  SCR_SpawnHandlerComponent handler = GetHandlerComponent();
227  if (!handler)
228  {
229  Print("GameMode does not support this method of spawning!", LogLevel.WARNING);
230  SendCanResponse_S(SCR_ESpawnResult.UNSUPPORTED_SPAWN_METHOD, data);
231  return;
232  }
233 
234  // Dispatch message
235  SCR_ESpawnResult response = handler.CanHandleRequest_S(this, data);
236  SendCanResponse_S(response, data);
237  }
238 
239  //------------------------------------------------------------------------------------------------
245  {
246  #ifdef _ENABLE_RESPAWN_LOGS
247  Print(string.Format("%1::SendCanResponse_S(resp: %2, data: %3)", Type().ToString(), typename.EnumToString(SCR_ESpawnResult, response), data), LogLevel.NORMAL);
248  #endif
249 
250  // End server request
251  SCR_SpawnLockComponent lock = GetLock();
252  if (lock)
253  {
254  lock.Unlock(this, true);
255  lock.Unlock(this, false);
256  }
257 
258  // Notify authority
259  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
260  respawnComponent.GetOnCanRespawnResponseInvoker_S().Invoke(this, response, data);
261 
262  // Send client response
263  Rpc(Rpc_SendCanResponse_O, response);
264  }
265 
266  //------------------------------------------------------------------------------------------------
270  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
271  protected void Rpc_SendCanResponse_O(SCR_ESpawnResult response)
272  {
273  #ifdef _ENABLE_RESPAWN_LOGS
274  Print(string.Format("%1::Rpc_SendCanResponse_O(resp: %2)", Type().ToString(), typename.EnumToString(SCR_ESpawnResult, response)), LogLevel.NORMAL);
275  #endif
276 
277  // End client request
278  SCR_SpawnLockComponent lock = GetLock();
279  if (lock)
280  lock.Unlock(this, false);
281 
282  // Notify
283  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
284  respawnComponent.GetOnCanRespawnResponseInvoker_O().Invoke(this, response, m_ConfirmationPendingData);
285 
286  // Release stored data
288  }
289 
290  //------------------------------------------------------------------------------------------------
296  {
297  #ifdef _ENABLE_RESPAWN_LOGS
298  Print(string.Format("%1::RequestRespawn(data: %2)", Type().ToString(), data), LogLevel.NORMAL);
299  #endif
300 
301  // Lock client
302  SCR_SpawnLockComponent lock = GetLock();
303  if (lock && !lock.TryLock(this, false))
304  {
305  Print("Caught request spawn on locked player!", LogLevel.WARNING);
306  return false;
307  }
308 
309  // Notify that request began
310  if (IsOwner())
311  m_RespawnComponent.GetOnRespawnRequestInvoker_O().Invoke(this);
312 
313  if (!IsProxy())
314  m_RespawnComponent.GetOnRespawnRequestInvoker_S().Invoke(this);
315 
316  // Request
317  bool success = DoRequestRespawn(data);
318 
319  // Notify self on local failure, early-reject.
320  if (!success)
322 
323  return success;
324  }
325 
326  //------------------------------------------------------------------------------------------------
332  {
333  Debug.Error("Not implemented!");
334  return false;
335  }
336 
337  //------------------------------------------------------------------------------------------------
342  {
343  #ifdef _ENABLE_RESPAWN_LOGS
344  Print(string.Format("%1::ProcessRequest_S(data: %2)", Type().ToString(), data), LogLevel.NORMAL);
345  #endif
346 
347  // Server lock
348  SCR_SpawnLockComponent lock = GetLock();
349  if (lock && !lock.TryLock(this, true))
350  {
351  Debug.Error("Caught request on locked player!");
352  return;
353  }
354 
355  // Find handler
356  SCR_SpawnHandlerComponent handler = GetHandlerComponent();
357  if (!handler)
358  {
359  Print("GameMode does not support this method of spawning!", LogLevel.WARNING);
360  SendResponse_S(SCR_ESpawnResult.UNSUPPORTED_SPAWN_METHOD, data);
361  return;
362  }
363 
364  // Dispatch message
365  IEntity spawnedEntity;
366  SCR_ESpawnResult response = handler.HandleRequest_S(this, data, spawnedEntity);
367 
368  // Entity was not spawned correctly, notify the requester and no finalisation
369  if (response != SCR_ESpawnResult.OK)
370  {
371  SendResponse_S(response, data);
372  return;
373  }
374 
375  // For entities that can technically be controlled by an AI agent, notify the agent
376  // that such entity is the result of a spawning process and is pending for a player
377  SCR_ChimeraAIAgent agent = FindAIAgent(spawnedEntity);
378  if (agent)
379  agent.SetPlayerPending_S(m_PlayerController.GetPlayerId());
380 
381  // Editor needs to be aware of whether the pending character is for a player or not in order to update the Editor Budget during spawning.
382  // TODO: Remove this after the Editor's Respawn Sytem refactor.
383  SCR_EditableCharacterComponent editorCharacter = SCR_EditableCharacterComponent.Cast(spawnedEntity.FindComponent(SCR_EditableCharacterComponent));
384  if (editorCharacter)
385  editorCharacter.SetIsPlayerPending(m_PlayerController.GetPlayerId());
386 
387  // Entity was spawned, so we can await finalisation.
389  OnFinalizeBegin_S(handler, data, spawnedEntity);
390  GetGame().GetCallqueue().CallLater(AwaitFinalization_S, 0, true, handler, data, spawnedEntity);
391  }
392 
393  //------------------------------------------------------------------------------------------------
398  protected void OnFinalizeBegin_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
399  {
400  #ifdef _ENABLE_RESPAWN_LOGS
401  Print(string.Format("%1::OnFinalizeBegin_S(handler: %1, data: %2, entity: %3)", Type().ToString(),
402  handler, data, spawnedEntity), LogLevel.NORMAL);
403  #endif
404  handler.OnFinalizeBegin_S(this, data, spawnedEntity);
405  }
406 
407  //------------------------------------------------------------------------------------------------
412  protected void AwaitFinalization_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
413  {
414  #ifdef _ENABLE_RESPAWN_LOGS
415  Print(string.Format("%1::AwaitFinalization_S(handler: %2, data: %3, entity: %4)", Type().ToString(),
416  handler, data, spawnedEntity), LogLevel.NORMAL);
417  #endif
418 
419  if (CanFinalize_S(handler, data, spawnedEntity))
420  {
421  FinalizeRequest_S(handler, data, spawnedEntity);
422  GetGame().GetCallqueue().Remove(AwaitFinalization_S);
423 
424  // For entities that were previously marked as pending player
425  // spawn, clear their state as the process is done
426  SCR_ChimeraAIAgent agent = FindAIAgent(spawnedEntity);
427  if (agent)
428  agent.SetPlayerPending_S(0);
429  }
430  }
431 
432  //------------------------------------------------------------------------------------------------
438  protected bool CanFinalize_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
439  {
440  #ifdef _ENABLE_RESPAWN_LOGS
441  Print(string.Format("%1::CanFinalize_S(handler: %2, data: %3, entity: %4)", Type().ToString(),
442  handler, data, spawnedEntity), LogLevel.NORMAL);
443  #endif
444  return handler.CanFinalize_S(this, data, spawnedEntity);
445  }
446 
447  //------------------------------------------------------------------------------------------------
453  protected void FinalizeRequest_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
454  {
455  #ifdef _ENABLE_RESPAWN_LOGS
456  Print(string.Format("%1::FinalizeRequest_S(handler: %1, data: %2, entity: %3)", Type().ToString(),
457  handler, data, spawnedEntity), LogLevel.NORMAL);
458  #endif
459  SCR_ESpawnResult response = handler.FinalizeRequest_S(this, data, spawnedEntity);
460  SendResponse_S(response, data);
461 
462  // Authority-side notification for systems to understand a spawn occurred
463  if (response != SCR_ESpawnResult.OK)
464  return;
465 
466  m_RespawnComponent.NotifySpawn(spawnedEntity);
467  }
468 
469  //------------------------------------------------------------------------------------------------
475  {
476  #ifdef _ENABLE_RESPAWN_LOGS
477  Print(string.Format("%1::SendResponse_S(resp: %2, data: %3)", Type().ToString(), typename.EnumToString(SCR_ESpawnResult, response), data), LogLevel.NORMAL);
478  #endif
479 
480  // End server request
481  SCR_SpawnLockComponent lock = GetLock();
482  if (lock)
483  {
484  lock.Unlock(this, true);
485  lock.Unlock(this, false);
486  }
487 
488  // Notify manager
489  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
490  respawnComponent.GetOnRespawnResponseInvoker_S().Invoke(this, response, data);
491 
492  // Send client response
493  Rpc(Rpc_SendResponse_O, response);
494  }
495 
496  //------------------------------------------------------------------------------------------------
498  protected void SendFinalizationBegin_S()
499  {
500  #ifdef _ENABLE_RESPAWN_LOGS
501  Print(string.Format("%1::SendFinalizationBegin_S()", Type().ToString()), LogLevel.NORMAL);
502  #endif
503 
505  }
506 
507  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
508  protected void Rpc_OnFinalizationBegin_O()
509  {
510  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
511  respawnComponent.GetOnRespawnFinalizeBeginInvoker_O().Invoke(this);
512  }
513 
514  //
515  // Preload handling
516  //
517 
518  //------------------------------------------------------------------------------------------------
521  {
522  return m_bIsPreloading;
523  }
524 
525  //------------------------------------------------------------------------------------------------
529  {
531  if (m_PlayerController)
532  RplComponent.InsertMPObserver(m_PlayerController.GetRplIdentity(), position[0], position[2]);
534  }
535 
536  //------------------------------------------------------------------------------------------------
537  protected void NotifyPreloadStarted_S()
538  {
539  m_bIsPreloading = true;
541  }
542 
543  //------------------------------------------------------------------------------------------------
544  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
545  protected void Rpc_NotifyPreloadStarted_S()
546  {
547  m_bIsPreloading = true;
548  }
549 
550  //------------------------------------------------------------------------------------------------
551  protected void NotifyPreloadFinished_S()
552  {
553  m_bIsPreloading = false;
555  }
556 
557  //------------------------------------------------------------------------------------------------
558  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
560  {
561  m_bIsPreloading = false;
562  if (m_PlayerController)
563  RplComponent.RemoveMPObserver(m_PlayerController.GetRplIdentity());
564  }
565 
566  //------------------------------------------------------------------------------------------------
567  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
568  protected void Rpc_StartPreload_O(vector position)
569  {
571  gm.GetOnPreloadFinished().Insert(NotifyPreloadFinished_S);
572  gm.StartSpawnPreload(position);
573  }
574 
575  //------------------------------------------------------------------------------------------------
579  [RplRpc(RplChannel.Reliable, RplRcver.Owner)]
580  protected void Rpc_SendResponse_O(SCR_ESpawnResult response)
581  {
582  #ifdef _ENABLE_RESPAWN_LOGS
583  Print(string.Format("%1::Rpc_SendResponse_O(resp: %2)", Type().ToString(), typename.EnumToString(SCR_ESpawnResult, response)), LogLevel.NORMAL);
584  #endif
585 
586  // End client request
587  SCR_SpawnLockComponent lock = GetLock();
588  if (lock)
589  lock.Unlock(this, false);
590 
591  // Notify client
592  SCR_RespawnComponent respawnComponent = GetRespawnComponent();
593  respawnComponent.GetOnRespawnResponseInvoker_O().Invoke(this, response, m_ConfirmationPendingData);
594  SCR_RespawnComponent.SGetOnLocalPlayerSpawned().Invoke();
595  }
596 
597  //------------------------------------------------------------------------------------------------
600  protected SCR_ChimeraAIAgent FindAIAgent(IEntity entity)
601  {
602  if (entity)
603  {
604  AIControlComponent controlComponent = AIControlComponent.Cast(entity.FindComponent(AIControlComponent));
605  if (controlComponent)
606  {
607  SCR_ChimeraAIAgent agent = SCR_ChimeraAIAgent.Cast(controlComponent.GetControlAIAgent());
608  return agent;
609  }
610  }
611 
612  return null;
613  }
614 
615  //------------------------------------------------------------------------------------------------
616  // destructor
618  {
620  RplComponent.RemoveMPObserver(m_PlayerController.GetRplIdentity());
621  }
622 
623  #ifdef ENABLE_DIAG
624  //------------------------------------------------------------------------------------------------
626  void DrawDiag()
627  {
628  if (!m_Diag)
629  m_Diag = CreateDiag();
630  if (m_Diag)
631  m_Diag.DrawDbgUI(GetPlayerController());
632  }
633 
634  protected ref SCR_BaseRespawnDiag m_Diag;
635 
636  //------------------------------------------------------------------------------------------------
637  protected ref SCR_BaseRespawnDiag CreateDiag()
638  {
639  return null;
640  }
641  #endif
642 }
643 
644 #ifdef ENABLE_DIAG
645 class SCR_BaseRespawnDiag
647 {
648  //------------------------------------------------------------------------------------------------
651  void DrawDbgUI(PlayerController playerController);
652 }
653 
655 class SCR_RespawnDiag<Class TReqComponent> : SCR_BaseRespawnDiag
656 {
657  protected TReqComponent m_RequestComponent;
658 
659  //------------------------------------------------------------------------------------------------
660  override void DrawDbgUI(PlayerController playerController)
661  {
662  if (m_RequestComponent == null)
663  m_RequestComponent = TReqComponent.Cast(playerController.FindComponent(TReqComponent));
664 
665  if (!m_RequestComponent)
666  return;
667 
668  int playerId = m_RequestComponent.GetPlayerId();
669  string label = string.Format("%1 [playerId: %2, playerName: %3])",
670  m_RequestComponent.Type().ToString(),
671  playerId,
672  GetGame().GetPlayerManager().GetPlayerName(playerId)
673  );
674 
675  DbgUI.Begin(label);
676  {
677  DrawContent();
678  }
679  DbgUI.End();
680  }
681 
682  //------------------------------------------------------------------------------------------------
683  protected void DrawContent()
684  {
685  SCR_SpawnHandlerComponent handlerComponent = m_RequestComponent.GetHandlerComponent();
686  if (handlerComponent != null)
687  DbgUI.Text(string.Format("Handler: %1", handlerComponent));
688  else
689  DbgUI.Text("Handler: Not found!");
690 
691  DbgUI.Text(string.Format("Data: %1", m_RequestComponent.GetDataType()));
692 
693  if (DbgUI.Button("Can Request"))
694  OnAskPressed();
695 
696  if (DbgUI.Button("Do Request"))
697  OnRequestPressed();
698  }
699 
700  //------------------------------------------------------------------------------------------------
701  protected void OnAskPressed()
702  {
703  SCR_SpawnData data = CreateData();
704  m_RequestComponent.CanRequestRespawn(data);
705  }
706 
707  //------------------------------------------------------------------------------------------------
708  protected void OnRequestPressed()
709  {
710  SCR_SpawnData data = CreateData();
711  m_RequestComponent.RequestRespawn(data);
712  }
713 
714  //------------------------------------------------------------------------------------------------
715  protected SCR_SpawnData CreateData()
716  {
717  Debug.Error("Not implemented");
718  return null;
719  }
720 }
721 #endif
FindAIAgent
protected SCR_ChimeraAIAgent FindAIAgent(IEntity entity)
Definition: SCR_SpawnRequestComponent.c:600
SCR_BaseGameMode
Definition: SCR_BaseGameMode.c:137
m_HandlerComponent
private SCR_SpawnHandlerComponent m_HandlerComponent
Definition: SCR_SpawnRequestComponent.c:27
IsOwner
protected bool IsOwner()
Definition: SCR_SpawnRequestComponent.c:86
SCR_RespawnComponent
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_RespawnComponent.c:576
SCR_PlayerController
Definition: SCR_PlayerController.c:31
SCR_ESpawnResult
SCR_ESpawnResult
Definition: SCR_ESpawnResult.c:8
Rpc_StartPreload_O
protected void Rpc_StartPreload_O(vector position)
Definition: SCR_SpawnRequestComponent.c:568
NotifyPreloadStarted_S
protected void NotifyPreloadStarted_S()
Definition: SCR_SpawnRequestComponent.c:537
ProcessRequest_S
protected void ProcessRequest_S(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:341
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
ProcessCanRequest_S
protected void ProcessCanRequest_S(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:208
GetRespawnComponent
protected SCR_RespawnComponent GetRespawnComponent()
Definition: SCR_SpawnRequestComponent.c:45
GetDataType
GetDataType()
Definition: SCR_SpawnRequestComponent.c:80
GetLock
protected SCR_SpawnLockComponent GetLock()
Definition: SCR_SpawnRequestComponent.c:59
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
~SCR_SpawnRequestComponent
void ~SCR_SpawnRequestComponent()
Definition: SCR_SpawnRequestComponent.c:617
FinalizeRequest_S
protected void FinalizeRequest_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
Definition: SCR_SpawnRequestComponent.c:453
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_SpawnRequestComponentClass
Definition: SCR_SpawnRequestComponent.c:1
GetPlayerController
PlayerController GetPlayerController()
Definition: SCR_SpawnRequestComponent.c:32
CanFinalize_S
protected bool CanFinalize_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
Definition: SCR_SpawnRequestComponent.c:438
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition: SCR_BaseGameModeComponent.c:15
SCR_SpawnData
Definition: SCR_SpawnData.c:9
DoCanRequestRespawn
protected bool DoCanRequestRespawn(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:198
m_RplComponent
private RplComponent m_RplComponent
Definition: SCR_SpawnRequestComponent.c:25
SCR_ChimeraAIAgent
Definition: SCR_ChimeraAIAgent.c:5
IsPreloading
bool IsPreloading()
Definition: SCR_SpawnRequestComponent.c:520
GetHandlerComponent
SCR_SpawnHandlerComponent GetHandlerComponent()
Definition: SCR_SpawnRequestComponent.c:52
GetHandlerType
GetHandlerType()
Definition: SCR_SpawnRequestComponent.c:72
OnPostInit
protected override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_SpawnRequestComponent.c:100
SendResponse_S
protected void SendResponse_S(SCR_ESpawnResult response, SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:474
AwaitFinalization_S
protected void AwaitFinalization_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
Definition: SCR_SpawnRequestComponent.c:412
m_PlayerController
SCR_SpawnRequestComponentClass m_PlayerController
m_ConfirmationPendingData
private ref SCR_SpawnData m_ConfirmationPendingData
Definition: SCR_SpawnRequestComponent.c:67
m_RespawnComponent
private SCR_RespawnComponent m_RespawnComponent
Definition: SCR_SpawnRequestComponent.c:23
SendFinalizationBegin_S
protected void SendFinalizationBegin_S()
Send a notification from the authority that the finalisation has started.
Definition: SCR_SpawnRequestComponent.c:498
IsProxy
protected bool IsProxy()
Definition: SCR_SpawnRequestComponent.c:92
CanRequestRespawn
sealed bool CanRequestRespawn(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:160
m_bIsPreloading
private bool m_bIsPreloading
Definition: SCR_SpawnRequestComponent.c:28
Rpc_NotifyPreloadStarted_S
protected void Rpc_NotifyPreloadStarted_S()
Definition: SCR_SpawnRequestComponent.c:545
SendCanResponse_S
protected void SendCanResponse_S(SCR_ESpawnResult response, SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:244
RequestRespawn
sealed bool RequestRespawn(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:295
Rpc_SendCanResponse_O
protected void Rpc_SendCanResponse_O(SCR_ESpawnResult response)
Definition: SCR_SpawnRequestComponent.c:271
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
StartSpawnPreload
void StartSpawnPreload(vector position)
Definition: SCR_SpawnRequestComponent.c:528
m_LockComponent
private SCR_SpawnLockComponent m_LockComponent
Definition: SCR_SpawnRequestComponent.c:24
Rpc_NotifyPreloadFinished_S
protected void Rpc_NotifyPreloadFinished_S()
Definition: SCR_SpawnRequestComponent.c:559
position
vector position
Definition: SCR_DestructibleTreeV2.c:30
DoRequestRespawn
protected bool DoRequestRespawn(SCR_SpawnData data)
Definition: SCR_SpawnRequestComponent.c:331
OnFinalizeBegin_S
protected void OnFinalizeBegin_S(SCR_SpawnHandlerComponent handler, SCR_SpawnData data, IEntity spawnedEntity)
Definition: SCR_SpawnRequestComponent.c:398
NotifyPreloadFinished_S
protected void NotifyPreloadFinished_S()
Definition: SCR_SpawnRequestComponent.c:551
Rpc_OnFinalizationBegin_O
protected void Rpc_OnFinalizationBegin_O()
Definition: SCR_SpawnRequestComponent.c:508
GetPlayerId
int GetPlayerId()
Definition: SCR_SpawnRequestComponent.c:39
Rpc_SendResponse_O
protected void Rpc_SendResponse_O(SCR_ESpawnResult response)
Definition: SCR_SpawnRequestComponent.c:580