Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DestructionManagerComponent.c
Go to the documentation of this file.
1#define ENABLE_BASE_DESTRUCTION
2[EntityEditorProps(category: "GameScripted/Destruction", description: "Enables destruction.")]
6
7class SCR_DestructionManagerComponent : ScriptComponent
8{
9#ifdef ENABLE_BASE_DESTRUCTION
10 //------------------------------------------------------------------------------------------------
11 override void OnPostInit(IEntity owner)
12 {
13 SetEventMask(owner, EntityEvent.INIT);
14 }
15
16 //------------------------------------------------------------------------------------------------
17 override void EOnInit(IEntity owner)
18 {
19 RplComponent rplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
20 if (!rplComponent || rplComponent.IsProxy())
21 return;
22
23 float delay = 10000;
24
25 if (RplSession.Mode() != RplMode.Dedicated)
26 delay = 500;
27
28 GetGame().GetCallqueue().CallLater(SCR_MPDestructionManager.InitializeDestructionManager, delay, false);
29 }
30#endif
31}
ArmaReforgerScripted GetGame()
Definition game.c:1398
RplMode
Mode of replication.
Definition RplMode.c:9
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
proto external int SetEventMask(notnull IEntity owner, int mask)
proto external Managed FindComponent(typename typeName)
static notnull SCR_MPDestructionManager InitializeDestructionManager()
void EOnInit(IEntity owner)
EntityEvent
Various entity events.
Definition EntityEvent.c:14