Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_WeaponDeployablePart.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue: "1", desc: "Delete magazines when spawned. Iterates throught all muzzle components and deletes all magazines that are found")]
4 protected bool m_bDeleteMagazines;
5
6 //------------------------------------------------------------------------------------------------
9 override void PostPrefabSpawn(notnull IEntity spawnedEntity)
10 {
12 return;
13
14 array<Managed> muzzles = {};
15 spawnedEntity.FindComponents(MuzzleComponent, muzzles);
16
17 IEntity magazine;
18 MuzzleComponent muzzle;
20 foreach (Managed entry : muzzles)
21 {
22 muzzle = MuzzleComponent.Cast(entry);
23 if (!muzzle)
24 continue;
25
26 magComp = muzzle.GetMagazine();
27 if (!magComp)
28 continue;
29
30 magazine = magComp.GetOwner();
31 RplComponent.DeleteRplEntity(magazine, false);
32 }
33 }
34}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override void PostPrefabSpawn(notnull IEntity spawnedEntity)
SCR_FieldOfViewSettings Attribute