DayZ 1.24
Loading...
Searching...
No Matches
PropertyModifiers Class Reference
Collaboration diagram for PropertyModifiers:
[legend]

Private Member Functions

float m_Weapon void PropertyModifiers (ItemBase owner)
 
float GetBarrelLength ()
 Get Barrel Legth in mm.
 
float CalculateBarrelLength (ItemBase owner)
 
void UpdateModifiers ()
 

Static Private Member Functions

static vector GetModifierRaw (ItemBase item, string modifier_name, vector value="1 1 1")
 

Private Attributes

vector m_RecoilModifiers
 
vector m_SwayModifiers
 
vector m_SightMisalignment
 
float m_BarrelLength
 
ItemBase m_OwnerItem
 

Detailed Description

Definition at line 1 of file PropertyModifiers.c.

Constructor & Destructor Documentation

◆ PropertyModifiers()

float m_Weapon void PropertyModifiers::PropertyModifiers ( ItemBase owner)
inlineprivate

Definition at line 12 of file PropertyModifiers.c.

13 {
14 //test_timer = new Timer();
15 //test_timer.Run(5, this, "Refresh", NULL, true);
19 }
float CalculateBarrelLength(ItemBase owner)

References CalculateBarrelLength(), m_BarrelLength, m_OwnerItem, and UpdateModifiers().

Member Function Documentation

◆ CalculateBarrelLength()

float PropertyModifiers::CalculateBarrelLength ( ItemBase owner)
inlineprivate

Definition at line 28 of file PropertyModifiers.c.

29 {
30 vector usti_hlavne_position = owner.GetSelectionPositionLS("usti hlavne"); //usti hlavne
31 vector konec_hlavne_position = owner.GetSelectionPositionLS("konec hlavne"); //konec hlavne
35 }
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.

References vector::Distance().

Referenced by GetBarrelLength(), and PropertyModifiers().

◆ GetBarrelLength()

float PropertyModifiers::GetBarrelLength ( )
inlineprivate

Get Barrel Legth in mm.

Definition at line 22 of file PropertyModifiers.c.

23 {
24 //return m_BarrelLength * 1000:
26 }

References CalculateBarrelLength(), and m_OwnerItem.

◆ GetModifierRaw()

static vector PropertyModifiers::GetModifierRaw ( ItemBase item,
string modifier_name,
vector value = "1 1 1" )
inlinestaticprivate

Definition at line 65 of file PropertyModifiers.c.

66 {
67 if (item.ConfigIsExisting(modifier_name))
68 value = item.ConfigGetVector(modifier_name);
69 return value;
70 }

Referenced by UpdateModifiers().

◆ UpdateModifiers()

void PropertyModifiers::UpdateModifiers ( )
inlineprivate

Definition at line 38 of file PropertyModifiers.c.

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 }
static vector GetModifierRaw(ItemBase item, string modifier_name, vector value="1 1 1")

References GetModifierRaw(), m_OwnerItem, m_RecoilModifiers, m_SightMisalignment, and m_SwayModifiers.

Referenced by PropertyModifiers().

Member Data Documentation

◆ m_BarrelLength

float PropertyModifiers::m_BarrelLength
private

Definition at line 7 of file PropertyModifiers.c.

Referenced by PropertyModifiers().

◆ m_OwnerItem

ItemBase PropertyModifiers::m_OwnerItem
private

Definition at line 9 of file PropertyModifiers.c.

Referenced by GetBarrelLength(), PropertyModifiers(), and UpdateModifiers().

◆ m_RecoilModifiers

vector PropertyModifiers::m_RecoilModifiers
private

Definition at line 3 of file PropertyModifiers.c.

Referenced by UpdateModifiers().

◆ m_SightMisalignment

vector PropertyModifiers::m_SightMisalignment
private

Definition at line 5 of file PropertyModifiers.c.

Referenced by UpdateModifiers().

◆ m_SwayModifiers

vector PropertyModifiers::m_SwayModifiers
private

Definition at line 4 of file PropertyModifiers.c.

Referenced by UpdateModifiers().


The documentation for this class was generated from the following file: