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

◆ OnWork()

override void Clothing::OnWork ( float consumed_energy)
inlineprotected

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

94 {
95 super.OnWork(consumed_energy);
96
97 if (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
98 {
99 Battery9V battery = Battery9V.Cast(GetCompEM().GetEnergySource());
100
101 if (battery && m_Light)
102 {
103 float efficiency = battery.GetEfficiency0To1();
104
105 if (efficiency < 1)
106 {
107 m_Light.SetIntensity(efficiency, GetCompEM().GetUpdateInterval());
108 }
109 else
110 {
111 m_Light.SetIntensity(1, 0);
112 }
113 }
114 }
115 }
float GetEfficiency0To1()
Returns efficiency of this battery. The value is synchronized from server to all clients and is accur...
Определения Battery9V.c:13
HeadtorchLight m_Light
Определения Headtorch_ColorBase.c:3
proto native CGame GetGame()

Перекрестные ссылки Battery9V::GetEfficiency0To1(), GetGame() и m_Light.