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

◆ Update()

void BunkerBroadcastHandler::Update ( float timeslice)
inlineprivate

not active bunkers and storage has processed without results

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

293 {
294 if (!m_ConfigLoaded)
295 return;
296
298 {
299 m_ActiveBunkersFromStorageCount = -1; // resets the count; no more processing
301 m_CanUpdate = true;
302 return;
303 }
304
305 if (!m_CanUpdate)
306 return;
307
309 m_BroadcastScheduler.OnUpdate(timeslice);
310
312 {
314
316 {
317 int registeredCountRound = Math.Max(Math.Round(m_RegisteredBunkers.Count() / 2), m_Config.bunkerSettings.numberOfActive);
318 if (registeredCountRound > 2)
319 m_ActiveBunkersHistory.Resize(registeredCountRound, -1);
320
321 Reset();
322 }
323 }
324 else
325 {
326 m_UpdateTimer += timeslice;
328 {
329 #ifdef ENABLE_LOGGING
330 Log(string.Format("General update (%1s)", UPDATE_TIME));
331 #endif
332
335
336 if (!m_BroadcastScheduler.IsActivePeriod())
337 {
338 #ifdef ENABLE_LOGGING
339 //Log("We are outside of active period, deactivating bunkers");
340 #endif
341
343 if (m_ActiveBunkers.Count() > 0 && m_ActiveBunkersFromStorageCount == 0)
344 Deactivate();
345 }
346
347 #ifdef DIAG_DEVELOPER
349 TIntArray bunkersHistory = GetActiveBunkersHistory();
350 SyncBunkersInfo(bunkerList, bunkersHistory);
351 #endif
352
354 m_BroadcastScheduler.CheckActivePeriod();
355
357
358 if (!m_CanUpdate)
359 Reset();
360 }
361 }
362 }
array< ref BunkerBroadcastComponentBase > BunkerComponentsArray
Определения BunkerBroadcastHandler.c:91
class LogTemplates Log(string message, LogTemplateID template_id=0)
Creates debug log (optional) from LogTemplate which are registred.
Определения LogTemplates.c:75
ref BunkerBroadcastConfigInstance m_Config
Определения BunkerBroadcastHandler.c:114
TIntArray GetActiveBunkersHistory()
Определения BunkerBroadcastHandler.c:273
ref SimpleCircularBuffer< int > m_ActiveBunkersHistory
Определения BunkerBroadcastHandler.c:117
bool ProcessBatch()
returns 'true' when all the batches are finished
Определения BunkerBroadcastHandler.c:464
BunkerComponentsArray GetRegisteredBunkers()
Определения BunkerBroadcastHandler.c:259
ref map< int, ref BunkerBroadcastComponentBase > m_RegisteredBunkers
how often is update called [seconds]
Определения BunkerBroadcastHandler.c:100
const float UPDATE_TIME
max batch size
Определения BunkerBroadcastHandler.c:98
int m_LastActiveBunkersCount
Определения BunkerBroadcastHandler.c:123
bool m_ProcessingFinished
Определения BunkerBroadcastHandler.c:108
ref ScriptInvoker m_OnActiveBunkersSelected
Определения BunkerBroadcastHandler.c:119
BunkerBroadcastScheduler m_BroadcastScheduler
Определения BunkerBroadcastHandler.c:113
ref BunkerComponentsArray m_ActiveBunkers
Определения BunkerBroadcastHandler.c:101
int m_ActiveBunkersFromStorageCount
Определения BunkerBroadcastHandler.c:124
void HandleChangedComponents()
Определения BunkerBroadcastHandler.c:500
array< int > TIntArray
Определения EnScript.c:733

Перекрестные ссылки CheckUpdating(), Deactivate(), GetActiveBunkersHistory(), GetRegisteredBunkers(), HandleChangedComponents(), Log(), m_ActiveBunkers, m_ActiveBunkersFromStorageCount, m_ActiveBunkersHistory, m_BroadcastScheduler, m_CanUpdate, m_Config, m_ConfigLoaded, m_LastActiveBunkersCount, m_OnActiveBunkersSelected, m_ProcessComponents, m_ProcessingFinished, m_RegisteredBunkers, m_UpdateTimer, Math::Max(), ProcessBatch(), Reset(), Math::Round() и UPDATE_TIME.