Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DestructionSynchronizationComponent.c
Go to the documentation of this file.
1 #define ENABLE_BASE_DESTRUCTION
2 
3 [EntityEditorProps(category: "GameScripted/Destruction", description: "")]
4 class SCR_DestructionSynchronizationComponentClass : ScriptComponentClass
5 {
6 }
7 
9 {
10 #ifdef ENABLE_BASE_DESTRUCTION
11  //------------------------------------------------------------------------------------------------
15  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
16  void RPC_RequestDestructibleState(RplId rplId, int index)
17  {
18  SCR_MPDestructionManager destructionManager = SCR_MPDestructionManager.GetInstance();
19  if (!destructionManager)
20  return;
21 
22  SCR_DestructionDamageManagerComponent destructible = destructionManager.FindDynamicallySpawnedDestructibleByIndex(rplId, index);
23  if (!destructible)
24  return;
25 
26  destructible.ReplicateDestructibleState();
27  }
28 
29  //------------------------------------------------------------------------------------------------
33  void RequestDestructibleState(RplId rplId, int index)
34  {
35  Rpc(RPC_RequestDestructibleState, rplId, index);
36  }
37 
38  //------------------------------------------------------------------------------------------------
39  override void OnPostInit(IEntity owner)
40  {
41  }
42 
43  //------------------------------------------------------------------------------------------------
44  // constructor
48  void SCR_DestructionSynchronizationComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
49  {
50  }
51 #endif
52 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
SCR_DestructionSynchronizationComponent
void SCR_DestructionSynchronizationComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_DestructionSynchronizationComponent.c:48
RequestDestructibleState
void RequestDestructibleState(RplId rplId, int index)
Definition: SCR_DestructionSynchronizationComponent.c:33
SCR_MPDestructionManager
Definition: SCR_MPDestructionManager.c:103
SCR_DestructionSynchronizationComponentClass
Definition: SCR_DestructionSynchronizationComponent.c:4
OnPostInit
override void OnPostInit(IEntity owner)
Called on PostInit when all components are added.
Definition: SCR_DestructionSynchronizationComponent.c:39
destructible
SCR_DestructionDamageManagerComponent destructible
Definition: SCR_DestructionSynchronizationComponent.c:22
RplRpc
SCR_DestructionSynchronizationComponentClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Server)] void RPC_RequestDestructibleState(RplId rplId
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180