Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DestructionSynchronizationComponent.c
Go to the documentation of this file.
1#define ENABLE_BASE_DESTRUCTION
2
3[EntityEditorProps(category: "GameScripted/Destruction", description: "")]
7
9{
10#ifdef ENABLE_BASE_DESTRUCTION
11 //------------------------------------------------------------------------------------------------
15 [RplRpc(RplChannel.Reliable, RplRcver.Server)]
16 void RPC_RequestDestructibleState(RplId rplId, int index)
17 {
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 //------------------------------------------------------------------------------------------------
34 {
35 Rpc(RPC_RequestDestructibleState, rplId, index);
36 }
37
38 //------------------------------------------------------------------------------------------------
39 override void OnPostInit(IEntity owner)
40 {
41 }
42
43 //------------------------------------------------------------------------------------------------
44 // constructor
51#endif
52}
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void RequestDestructibleState(RplId rplId, int index)
void SCR_DestructionSynchronizationComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
SCR_DestructionDamageManagerComponent destructible
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
Replication item identifier.
Definition RplId.c:14
SCR_DestructionDamageManagerComponent FindDynamicallySpawnedDestructibleByIndex(RplId rplId, int index)
static SCR_MPDestructionManager GetInstance()
Returns the instance of the destruction manager.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition EnNetwork.c:95
RplRcver
Definition RplRcver.c:59
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition RplChannel.c:14