DayZ 1.24
Loading...
Searching...
No Matches
PropertyModifiers.c
Go to the documentation of this file.
2{
6
8 //ref Timer test_timer;
10 float m_Weapon
11
13 {
14 //test_timer = new Timer();
15 //test_timer.Run(5, this, "Refresh", NULL, true);
19 }
20
23 {
24 //return m_BarrelLength * 1000:
26 }
27
29 {
30 vector usti_hlavne_position = owner.GetSelectionPositionLS("usti hlavne"); //usti hlavne
31 vector konec_hlavne_position = owner.GetSelectionPositionLS("konec hlavne"); //konec hlavne
35 }
36
37
39 {
40 m_RecoilModifiers = GetModifierRaw(m_OwnerItem, "recoilModifier");
42 m_SightMisalignment = GetModifierRaw(m_OwnerItem, "sightMisalignmentModifier");
43
44 for (int i = 0; i < m_OwnerItem.GetInventory().AttachmentCount(); i++)
45 {
46 ItemBase attachment = ItemBase.Cast(m_OwnerItem.GetInventory().GetAttachmentFromIndex(i));
47
52
57
58 temp_value = PropertyModifiers.GetModifierRaw(attachment, "sightMisalignmentModifier");
62 }
63 }
64
66 {
67 if (item.ConfigIsExisting(modifier_name))
68 value = item.ConfigGetVector(modifier_name);
69 return value;
70 }
71
72}
InventoryItem m_Weapon
Weapons - cache.
float CalculateBarrelLength(ItemBase owner)
float m_Weapon void PropertyModifiers(ItemBase owner)
static vector GetModifierRaw(ItemBase item, string modifier_name, vector value="1 1 1")
float GetBarrelLength()
Get Barrel Legth in mm.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.