DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ WeaponParticlesBase()

void WeaponParticlesBase::WeaponParticlesBase ( ItemBase muzzle_owner,
string config_OnFire_entry )
inlineprivate

См. определение в файле WeaponParticles.c строка 33

34 {
35 m_Name = config_OnFire_entry;
36
37 // ignoreIfSuppressed
38 m_IgnoreIfSuppressed = GetGame().ConfigGetFloat(string.Format("%1 ignoreIfSuppressed", m_Name));
39
40 // onlyIfBoltIsOpen
41 m_OnlyIfBoltIsOpen = GetGame().ConfigGetFloat(string.Format("%1 onlyIfBoltIsOpen", m_Name));
42
43 // illuminateWorld
44 m_IlluminateWorld = GetGame().ConfigGetFloat(string.Format("%1 illuminateWorld", m_Name));
45
46 m_MuzzleIndex = -1;
47 if (GetGame().ConfigIsExisting(string.Format("%1 muzzleIndex", m_Name)))
48 {
49 m_MuzzleIndex = GetGame().ConfigGetInt(string.Format("%1 muzzleIndex", m_Name));
50 }
51
52 // onlyIfWeaponIs
54 GetGame().ConfigGetText(string.Format("%1 onlyIfWeaponIs", m_Name), m_OnlyIfWeaponIs);
55
56 // onlyIfBulletIs
58 GetGame().ConfigGetText(string.Format("%1 onlyIfBulletIs", m_Name), m_OnlyIfBulletIs);
59
60 // onlyWithinHealthLabel[]
61 array<float> health_limit = new array<float>;
62 GetGame().ConfigGetFloatArray(string.Format("%1 onlyWithinHealthLabel", m_Name), health_limit);
63
64 if (health_limit.Count() == 2)
65 {
66 m_OnlyWithinHealthLabelMin = health_limit.Get(0);
67 m_OnlyWithinHealthLabelMax = health_limit.Get(1);
68 }
69 else
70 {
71 // Disable this filter
74 }
75
76 // onlyWithinOverheatLimits[]
77 array<float> overheat_limit = new array<float>;
78 GetGame().ConfigGetFloatArray(string.Format("%1 onlyWithinOverheatLimits", m_Name), overheat_limit);
79
80 if (overheat_limit.Count() == 2)
81 {
82 m_OnlyWithinOverheatLimitsMin = overheat_limit.Get(0);
83 m_OnlyWithinOverheatLimitsMax = overheat_limit.Get(1);
84 }
85 else
86 {
87 // Disable this filter
90 }
91
92 // onlyWithinRainLimits[]
93 array<float> rain_limit = new array<float>;
94 GetGame().ConfigGetFloatArray(string.Format("%1 onlyWithinRainLimits", m_Name), rain_limit);
95
96 if (rain_limit.Count() == 2)
97 {
98 m_OnlyWithinRainLimitsMin = rain_limit.Get(0);
99 m_OnlyWithinRainLimitsMax = rain_limit.Get(1);
100 }
101 else
102 {
103 // Disable this filter
106 }
107
108 // overridePoint
109 m_OverridePoint = "";
110 GetGame().ConfigGetText(string.Format("%1 overridePoint", m_Name), m_OverridePoint);
111
112 if (m_OverridePoint == "")
113 m_OverridePoint = "Usti hlavne"; // default memory point name
114
115 // overrideParticle
116 string particle_name = "";
117 GetGame().ConfigGetText( string.Format("%1 overrideParticle", m_Name), particle_name);
118
119 if (particle_name != "")
120 {
121 m_OverrideParticle = ParticleList.GetParticleIDByName(particle_name);
122 }
123 else
124 {
126 ErrorEx(string.Format("'%1' does not contain a definition for 'overrideparticle'",
127 config_OnFire_entry), ErrorExSeverity.INFO);
128 }
129
130 // overrideDirectionPoint
132 GetGame().ConfigGetText(string.Format("%1 overrideDirectionPoint", m_Name), m_OverrideDirectionPoint);
133
134 if (m_OverrideDirectionPoint == "")
135 {
136 // overrideDirectionVector
137 vector test_ori = GetGame().ConfigGetVector(string.Format("%1 overrideDirectionVector", m_Name));
138
139 if (test_ori != vector.Zero)
140 {
141 m_OverrideDirectionVector = test_ori;
142 }
143 }
144
145 // positionOffset[]
146 array<float> v = new array<float>;
147 GetGame().ConfigGetFloatArray(string.Format("%1 positionOffset", m_Name), v);
148
149 if (v.Count() == 3)
150 {
151 float v1 = v.Get(0);
152 float v2 = v.Get(1);
153 float v3 = v.Get(2);
154 m_PositionOffset = Vector(v1, v2, v3);
155 }
156 }
proto native vector ConfigGetVector(string path)
Get vector value from config on path.
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
float m_OnlyWithinRainLimitsMin
Определения WeaponParticles.c:18
int m_OnlyWithinHealthLabelMin
Определения WeaponParticles.c:14
vector m_PositionOffset
Определения WeaponParticles.c:25
float m_OnlyWithinOverheatLimitsMax
Определения WeaponParticles.c:17
float m_OnlyWithinRainLimitsMax
Определения WeaponParticles.c:19
string m_OnlyIfWeaponIs
Определения WeaponParticles.c:22
bool m_IgnoreIfSuppressed
Определения WeaponParticles.c:10
int m_OverrideParticle
Определения WeaponParticles.c:13
float m_OnlyWithinOverheatLimitsMin
Определения WeaponParticles.c:16
string m_OnlyIfBulletIs
Определения WeaponParticles.c:21
int m_MuzzleIndex
Определения WeaponParticles.c:12
string m_OverrideDirectionPoint
Определения WeaponParticles.c:20
bool m_OnlyIfBoltIsOpen
Определения WeaponParticles.c:11
string m_Name
Определения WeaponParticles.c:27
string m_OverridePoint
Определения WeaponParticles.c:23
vector m_OverrideDirectionVector
Определения WeaponParticles.c:24
int m_OnlyWithinHealthLabelMax
Определения WeaponParticles.c:15
bool m_IlluminateWorld
Определения WeaponParticles.c:9
proto native CGame GetGame()
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки CGame::ConfigGetFloat(), CGame::ConfigGetFloatArray(), CGame::ConfigGetInt(), CGame::ConfigGetText(), CGame::ConfigGetVector(), ErrorEx, GetGame(), ParticleList::GetParticleIDByName(), m_IgnoreIfSuppressed, m_IlluminateWorld, m_MuzzleIndex, m_Name, m_OnlyIfBoltIsOpen, m_OnlyIfBulletIs, m_OnlyIfWeaponIs, m_OnlyWithinHealthLabelMax, m_OnlyWithinHealthLabelMin, m_OnlyWithinOverheatLimitsMax, m_OnlyWithinOverheatLimitsMin, m_OnlyWithinRainLimitsMax, m_OnlyWithinRainLimitsMin, m_OverrideDirectionPoint, m_OverrideDirectionVector, m_OverrideParticle, m_OverridePoint, m_PositionOffset, Vector() и vector::Zero.