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

◆ RotateGoggles()

void PoweredOptic_Base::RotateGoggles ( bool state)
inlineprivate

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

146 {
147 if (!m_Strap && !state) // disable non default rotation while not strapped
148 return;
149
150 //if ( GetAnimationPhase("rotate") != state ) //useless?
151 SetAnimationPhase("rotate",!state);
152 m_IsLowered = !state;
153
154 PlayerBase player;
155 int slot_id;
156 string slot_name;
157 if ( m_Strap && m_Strap.GetInventory().GetCurrentAttachmentSlotInfo(slot_id,slot_name) && PlayerBase.CastTo(player, m_Strap.GetHierarchyParent())/*&& slot_id == InventorySlots.EYEWEAR*/ )
158 {
159 player.SetNVGLowered(m_IsLowered);
160 }
161
162 if ( GetCompEM() )
163 {
164 if ( !state && GetCompEM().CanWork() )
165 GetCompEM().SwitchOn();
166 else
167 GetCompEM().SwitchOff();
168 }
169 }
Clothing m_Strap
Определения NVGoggles.c:4
bool m_IsLowered
Определения NVGoggles.c:3

Перекрестные ссылки m_IsLowered и m_Strap.

Используется в NVGoggles(), OnWasAttached(), OnWasDetached(), OnWork() и OnWorkStart().