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

◆ InitReddotData()

void ItemOptics::InitReddotData ( )
inlineprotected

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

346 {
347 bool isUsing2D = IsUsingOptics2DModel();
348
349 string path;
350 if (isUsing2D)
351 {
352 path = "cfgVehicles " + GetType() + " OpticsModelInfo";
353 }
354 else
355 {
356 path = "cfgVehicles " + GetType() + " OpticsInfo";
357 }
358 string temp;
359
360 if (g_Game.ConfigIsExisting(path))
361 {
362 if (isUsing2D)
364 else
365 m_reddot_index = GetHiddenSelectionIndex("reddot");
366
367 if (g_Game.ConfigIsExisting(path + " opticSightTexture"))
368 {
369 g_Game.ConfigGetText(path + " opticSightTexture", temp);
371 temp = "";
372 }
373 if (g_Game.ConfigIsExisting(path + " opticSightMaterial"))
374 {
375 g_Game.ConfigGetText(path + " opticSightMaterial", temp);
377 temp = "";
378 }
379 }
380 m_data_set = true;
381 }
eBleedingSourceType GetType()
DayZGame g_Game
Определения DayZGame.c:3942
string path
Определения OptionSelectorMultistate.c:142
int m_reddot_index
Определения ItemOptics.c:9
bool IsUsingOptics2DModel()
Returns whether this ItemOptics uses the 2D optics model.
Определения ItemOptics.c:207
bool m_data_set
Определения ItemOptics.c:3
string m_optic_sight_material
Определения ItemOptics.c:13
ItemOpticsType GetItemOpticsType()
Returns the ItemOpticsType of this ItemOptics instance.
Определения ItemOptics.c:201
string m_optic_sight_texture
Определения ItemOptics.c:12
proto native int FindOptics2DSelection(string selectionName, bool ignoreCase=true)
Finds selection index by name.

Перекрестные ссылки ItemOpticsType::FindOptics2DSelection(), g_Game, GetItemOpticsType(), GetType(), IsUsingOptics2DModel(), m_data_set, m_optic_sight_material, m_optic_sight_texture, m_reddot_index и path.

Используется в ItemOptics() и ShowReddot().