1 [
EntityEditorProps(
category:
"GameScripted/Campaign", description:
"A weapon rack slot to be filled with a weapon.", color:
"0 0 255 255")]
21 return m_eSupportedItemTypes;
27 return m_eSupportedItemModes;
33 return m_eCurrentItemType;
39 return m_eCurrentItemMode;
49 RplComponent.DeleteRplEntity(child,
false);
57 bool CanSpawnItem(
bool deleteExisting =
false)
80 RplComponent.DeleteRplEntity(child,
false);
85 EntitySpawnParams
params =
new EntitySpawnParams();
87 params.TransformMode = ETransformMode.WORLD;
89 IEntity item =
GetGame().SpawnEntityPrefab(itemResource, GetWorld(),
params);
95 item.ClearFlags(EntityFlags.PROXY);
97 vector positionOffset, rotationOffset = vector.Zero;
100 positionOffset = itemDisplayData.GetItemOffset();
101 rotationOffset = itemDisplayData.GetItemRotation();
105 item.SetAngles(rotationOffset);
109 item.GetLocalTransform(mat);
110 mat[3] = mat[3] + positionOffset;
111 item.SetLocalTransform(mat);
113 if (item.FindComponent(MagazineComponent))
114 item.SetFlags(EntityFlags.PROXY);
116 item.ClearFlags(EntityFlags.ACTIVE);
121 itemComp.DisablePhysics();
126 m_eCurrentItemType = arsenalData.GetItemType();
127 m_eCurrentItemMode = arsenalData.GetItemMode();