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

◆ OnWork()

override void Roadflare::OnWork ( float consumed_energy)
inlineprivate

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

237 {
238 if ( GetGame().IsServer() )
239 {
240 float burning_time = GetCompEM().GetEnergyMax() - GetCompEM().GetEnergy();
241
242 // Update burning states
243 if (m_BurningState == RoadflareBurningState.INITIAL_BURN)
244 {
245 if (burning_time >= INITIAL_BURNING_STATE_TIME)
246 {
248 }
249 }
250 else if ( m_BurningState == RoadflareBurningState.MAIN_BURN )
251 {
252 /*if ( GetGame().GetWorld().IsNight() )
253 {
254 NoiseSystem noise = GetGame().GetNoiseSystem();
255 if ( noise )
256 {
257 noise.AddNoisePos( this, GetPosition(), m_NoisePar, NoiseAIEvaluate.GetNoiseReduction(GetGame().GetWeather()));
258 }
259 }*/
260
261 if ( burning_time >= GetCompEM().GetEnergyMax() - FINAL_BURNING_STATE_TIME )
262 {
264 }
265 }
266
267 // Burn containers of this roadflare. This might be removed if lit roadflare can't be put into inventory.
268 /*EntityAI container_EAI = GetHierarchyParent();
269
270 if ( container_EAI && container_EAI.IsInherited(ItemBase) && !container_EAI.IsInherited(TripwireTrap) )
271 {
272 ItemBase container_IB = ItemBase.Cast( container_EAI );
273
274 int c_size = container_IB.GetItemSize();
275 if (c_size == 0)
276 c_size = 1;
277
278 container_IB.AddHealth("","",-10/c_size);
279 }*/
280 }
281
283 }
RoadflareBurningState
Определения Roadflare.c:8
const int FINAL_BURNING_STATE_TIME
Определения Roadflare.c:28
void UpdateActiveParticles()
Определения Roadflare.c:327
void SetBurningStateSynchronized(int state_number)
Определения Roadflare.c:226
const int INITIAL_BURNING_STATE_TIME
Определения Roadflare.c:27
int m_BurningState
Определения Roadflare.c:30
proto native CGame GetGame()

Перекрестные ссылки FINAL_BURNING_STATE_TIME, GetGame(), INITIAL_BURNING_STATE_TIME, m_BurningState, SetBurningStateSynchronized() и UpdateActiveParticles().