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

◆ LoadAmmoTypes()

void DustKickupEffects::LoadAmmoTypes ( )
inlineprivate

Iterate over each ammo type in the config

Iterate over each of the different stances to extract the distance values and the effects for each stance

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

90 {
91 string configPath = "CfgMagazines ";
92 string childClass = "";
93
94 int count = g_Game.ConfigGetChildrenCount(configPath);
95
97 for (int i = 0; i < count; ++i)
98 {
99 g_Game.ConfigGetChildName(configPath, i, childClass);
100 if (!childClass.Contains("Ammo"))
101 continue;
102
103 string ammoType = "";
104
105 int effCount = g_Game.ConfigGetChildrenCount(configPath + childClass + " Effects");
106 array<ref DustKickupEffectDistanceData> dataArray = new array <ref DustKickupEffectDistanceData>();
107
109 for (int j = 0; j < effCount; ++j)
110 {
111 string stance;
112 g_Game.ConfigGetChildName(configPath + childClass + " Effects", j, stance);
113
114 string effectPath = configPath + childClass + " Effects" + " " + stance;
115
116 float minDist;
117 float maxDist;
118 array<string> effects = new array<string>();
119
120 minDist = g_Game.ConfigGetFloat(effectPath + " minDist");
121 maxDist = g_Game.ConfigGetFloat(effectPath + " maxDist");
122 g_Game.ConfigGetTextArray(effectPath + " Effects", effects);
123
124 dataArray.Insert(new DustKickupEffectDistanceData(minDist, maxDist, effects));
125 }
126
127 if (effCount > 0)
128 {
129 m_EffectRanges.Insert(childClass, dataArray);
130 }
131 }
132 }
DayZGame g_Game
Определения DayZGame.c:4074
string ammoType
Определения DustKickupEffects.c:24
ref map< string, ref array< ref DustKickupEffectDistanceData > > m_EffectRanges
Определения DustKickupEffects.c:49
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286

Перекрестные ссылки ammoType, string::Contains(), g_Game и m_EffectRanges.

Используется в Init().