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

◆ ShowReddot()

void ItemOptics::ShowReddot ( bool state)
inlineprotected

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

379 {
380 if (GetGame().IsDedicatedServer())
381 {
382 ErrorEx("should not be called on the server!",ErrorExSeverity.INFO);
383 return;
384 }
385
386 if (!m_data_set)
387 {
389 }
390
391 // does not have reddot
392 if (m_reddot_index == -1)
393 {
394 return;
395 }
396
397 // 2D model has special handling in `OnDrawOptics2D`
399 {
400 if (state)
401 {
402 if (m_optic_sight_texture != "")
403 SetObjectTexture(m_reddot_index, m_optic_sight_texture);
404 if (m_optic_sight_material != "")
405 SetObjectMaterial(m_reddot_index, m_optic_sight_material);
406 }
407 else
408 {
409 SetObjectTexture(m_reddot_index, "");
410 SetObjectMaterial(m_reddot_index, "");
411 }
412 }
413 m_reddot_displayed = state;
414 }
int m_reddot_index
Определения ItemOptics.c:9
bool IsUsingOptics2DModel()
Returns whether this ItemOptics uses the 2D optics model.
Определения ItemOptics.c:207
void InitReddotData()
Определения ItemOptics.c:340
bool m_data_set
Определения ItemOptics.c:3
string m_optic_sight_material
Определения ItemOptics.c:13
string m_optic_sight_texture
Определения ItemOptics.c:12
proto native CGame GetGame()
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, GetGame(), InitReddotData(), IsUsingOptics2DModel(), m_data_set, m_optic_sight_material, m_optic_sight_texture и m_reddot_index.

Используется в OnWorkStart(), OnWorkStop() и UpdateOpticsReddotVisibility().