82 return notifier_id >= 0 && notifier_id <
MAX_COUNT;
100 #ifdef DIAG_NOTIFIER_LOGS
124 #ifdef DIAG_NOTIFIER_LOGS
161 if (!notifier || !notifier.
IsActive())
170 #ifdef DIAG_NOTIFIER_LOGS
180 #ifdef DIAG_NOTIFIER_LOGS
181 ErrorEx(
string.Format(
"SetNotifierActive failed, notifier %1 not found.", notifier_id),
ErrorExSeverity.ERROR);
186 bool changed = (notifier.
IsActive() != state);
194 else if (changed && immediate)
223 if (!currentNotifier || !currentNotifier.
IsActive())
225 #ifdef DIAG_NOTIFIER_LOGS
226 ErrorEx(
string.Format(
"Skipping immediate notifier id=%1 (missing or inactive).", notifierID),
ErrorExSeverity.INFO);
231 #ifdef DIAG_NOTIFIER_LOGS
232 ErrorEx(
string.Format(
"Immediate tick for notifier %1 with ID %2.", currentNotifier, notifierID),
ErrorExSeverity.INFO);
235 currentNotifier.
OnTick(currentTime);
246 #ifdef DIAG_NOTIFIER_LOGS
247 if (notifierCount == 0)
256 #ifdef DIAG_NOTIFIER_LOGS
264 #ifdef DIAG_NOTIFIER_LOGS
270 if (currentNotifier && currentNotifier.
IsActive())
272 #ifdef DIAG_NOTIFIER_LOGS
278 #ifdef DIAG_NOTIFIER_LOGS
281 currentNotifier.
OnTick(currentTime);
283 #ifdef DIAG_NOTIFIER_LOGS
290 #ifdef DIAG_NOTIFIER_LOGS
293 if (!currentNotifier)
296 ErrorEx(
string.Format(
"Could get notifier %1 with ID %2 but notifier is inactive!", currentNotifier, notifierID),
ErrorExSeverity.INFO);
313 int currentTime =
g_Game.GetTime();
void VirtualHud(PlayerBase player)
string m_System
the manager instance
bool IsNotifierActive(int type)
void NotifiersManager(PlayerBase player)
ref VirtualHud m_VirtualHud
void ClearImmediatePending(int notifier_id)
bool SetNotifierActive(int notifier_id, bool state, bool immediate=false)
ref array< int > m_NotifierIDs
Notifier ids in registration order.
bool m_ImmediatePending[MAX_COUNT]
VirtualHud GetVirtualHud()
NotifierBase FindNotifier(int type)
bool HasNotifier(int type)
enum eNotifiers MAX_COUNT
ref array< int > m_ImmediateNotifierIDs
NotifierBase m_NotifiersStatic[MAX_COUNT]
bool IsNotifierIDValid(int notifier_id)
void DeactivateByType(int notifier, bool triggerEvent=true)
void TickSingleNotifier(int currentTime)
ref array< ref NotifierBase > m_Notifiers
void RegisterItself(int notifier_id, NotifierBase modifier)
int m_LastPolledIndex
Round-robin index.
void RequestImmediateUpdate(int notifier_id)
bool ProcessImmediateNotifier(int currentTime)
void ActivateByType(int notifier, bool triggerEvent=true)
void SetActive(bool state)
void OnTick(float current_time)
bool IsTimeToTick(int current_time)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int MIN_TICK_NOTIFIERS