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

◆ InitReddotData()

void ItemOptics::InitReddotData ( )
inlineprotected

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

341 {
342 bool isUsing2D = IsUsingOptics2DModel();
343
344 string path;
345 if (isUsing2D)
346 {
347 path = "cfgVehicles " + GetType() + " OpticsModelInfo";
348 }
349 else
350 {
351 path = "cfgVehicles " + GetType() + " OpticsInfo";
352 }
353 string temp;
354
355 if (GetGame().ConfigIsExisting(path))
356 {
357 if (isUsing2D)
358 m_reddot_index = GetItemOpticsType().FindOptics2DSelection("reddot");
359 else
360 m_reddot_index = GetHiddenSelectionIndex("reddot");
361
362 if (GetGame().ConfigIsExisting(path + " opticSightTexture"))
363 {
364 GetGame().ConfigGetText(path + " opticSightTexture", temp);
366 temp = "";
367 }
368 if (GetGame().ConfigIsExisting(path + " opticSightMaterial"))
369 {
370 GetGame().ConfigGetText(path + " opticSightMaterial", temp);
372 temp = "";
373 }
374 }
375 m_data_set = true;
376 }
eBleedingSourceType GetType()
string path
Определения OptionSelectorMultistate.c:142
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
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 CGame GetGame()

Перекрестные ссылки CGame::ConfigGetText(), GetGame(), GetItemOpticsType(), GetType(), IsUsingOptics2DModel(), m_data_set, m_optic_sight_material, m_optic_sight_texture, m_reddot_index и path.

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