35 bool tick = (current_time >= tickTime);
36 #ifdef DIAG_NOTIFIER_LOGS
37 ErrorEx(
string.Format(
"Tick time for notifier %1 is %2 | Current time= %3.",
this, tickTime, current_time),
ErrorExSeverity.INFO);
42 float drift = (current_time - tickTime) / 1000.0;
43 ErrorEx(
string.Format(
"Notifier %1 updated after %2s (expected: %3s, drift: +%4s)",
this, timePassed, expectedInterval, drift),
ErrorExSeverity.INFO);
61 return this.ClassName() +
" Notifier";
110 int nValues = values.Count();
111 for (i = 0; i < nValues; ++i)
113 valuesSum += values.Get(i);
133 int nValues = values.Count();
134 for (
int i = 0; i < nValues - 1; i++)
136 value1 = values.Get(i);
137 value2 = values.Get(i + 1);
138 float average = (value1 + value2) / 2;
139 values.Set(i, average);
140 values.Set(i + 1, average);
143 int index = nValues - 1;
144 values.Set(index, value2);
149 OnTick((
int)current_Time);
154 #ifdef DIAG_NOTIFIER_LOGS
166 protected int CalculateTendency(
float delta,
float inctresholdlow,
float inctresholdmed,
float inctresholdhigh,
float dectresholdlow,
float dectresholdmed,
float dectresholdhigh)
169 if (delta > inctresholdhigh)
171 else if (delta > inctresholdmed)
173 else if (delta > inctresholdlow)
175 else if (delta < dectresholdhigh)
177 else if (delta < dectresholdmed)
179 else if (delta < dectresholdlow)
191 else if (value >= lvl_2)
193 else if (value >= lvl_1)
const int TENDENCY_INC_LOW
const int TENDENCY_DEC_HIGH
const int TENDENCY_DEC_MED
const int TENDENCY_INC_MED
const int TENDENCY_DEC_LOW
const int TENDENCY_INC_HIGH
const int TENDENCY_STABLE
void VirtualHud(PlayerBase player)
void NotifiersManager(PlayerBase player)
PluginBase GetPlugin(typename plugin_type)
void SmoothOutFloatValues(array< float > values)
void SetActive(bool state)
void OnTick(int currentTime)
void DisplayTendency(float delta)
int m_TendencyBufferWriteIterator
void OnTick(float current_Time)
PluginPlayerStatus m_ModulePlayerStatus
eBadgeLevel DetermineBadgeLevel(float value, float lvl_1, float lvl_2, float lvl_3)
const int TENDENCY_BUFFER_SIZE
float ReadFromCyclicBuffer(int index)
bool IsTimeToTick(int current_time)
void AddToCyclicBuffer(float value)
VirtualHud GetVirtualHud()
void NotifierBase(NotifiersManager manager)
NotifiersManager m_Manager
int m_TickIntervalLastTick
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
float m_TendencyBuffer[TENDENCY_BUFFER_SIZE]
Result for an object found in CGame.IsBoxCollidingGeometryProxy.