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

◆ Update() [2/3]

void Managed::Update ( float timeSlice)
inlineprotected

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

164 {
165 if ( !m_Initialized )
166 {
167 return;
168 }
169
170#ifdef DIAG_DEVELOPER
171 if (DbgBleedingIndicationStaticInfo.m_DbgUseOverrideValues)
172 {
173 m_SequenceDuration = DbgBleedingIndicationStaticInfo.m_DbgSequenceDuration;
174 }
175#endif
177
178 //run drops, if possible
179 if (!m_Terminating)
180 {
181 if (m_IsRunning)
182 {
184 {
186 {
187 float rnd = Math.RandomFloat01();
189 {
191 }
192
194 }
195 }
196
197 float sinceLastDrop = m_TimeElapsedTotal - m_LastDropSpawnTime;
199 {
201 }
202 else if (m_DropSpawnsQueued > 0) //spawn queued drop
203 {
204 if (sinceLastDrop >= m_DropSpawnMinDelay)
205 {
207 }
208 }
209 else if (sinceLastDrop > m_DropSpawnMaxDelay)
210 {
211 TrySpawnNextDrop(); //guaranteed drop
212 m_CurrentDropProbabilityStep++; //substitutes a regular roll..
213 }
214 }
215 else //1st drop ignores delay
216 {
218 }
219 }
220
221 for (int i = 0; i < m_ActiveDropsCount; i++)
222 {
223 if (!m_EndNow)
224 {
225 //Simulate drops
226 m_ActiveDrops[i].Update(timeSlice);
227 }
228 else
229 {
230 m_ActiveDrops[i].StopDrop();
231 }
232
233 if (!m_ActiveDrops[i].IsRunning())
234 {
235 m_CleanupQueue.Insert(i);
236 }
237 }
238
239 //Cleanup drops
240 for (i = m_CleanupQueue.Count() - 1; i >= 0; i--)
241 {
242 m_ActiveDrops.Remove(m_CleanupQueue[i]);
244 }
245 m_CleanupQueue.Clear();
246
248 {
249 m_EndNow = true;
250 }
251
252 m_TimeElapsedTotal += timeSlice;
253 m_TimeElapsedSequence += timeSlice;
254 }
float m_SequenceDuration
Определения BleedingIndicator.c:18
ref set< ref BleedingIndicatorDropData > m_ActiveDrops
Определения BleedingIndicator.c:28
void ResetSequence()
Определения BleedingIndicator.c:145
ref set< int > m_CleanupQueue
Определения BleedingIndicator.c:29
int m_CurrentDropProbabilityStep
Определения BleedingIndicator.c:24
int m_ActiveDropsCount
Определения BleedingIndicator.c:10
bool m_Terminating
Определения BleedingIndicator.c:6
array< float > m_DropProbabilityArray
Определения BleedingIndicator.c:14
bool IsRunningDrops()
Are any drops currently being animated?
Определения BleedingIndicator.c:123
int m_DropSpawnsQueued
Определения BleedingIndicator.c:9
float m_TimeElapsedTotal
Определения BleedingIndicator.c:19
float m_LastDropSpawnTime
Определения BleedingIndicator.c:21
float m_SequenceTick
Определения BleedingIndicator.c:17
void StartRunningDrops()
Определения BleedingIndicator.c:112
static bool m_Initialized
Определения PPERequesterBank.c:7
float m_TimeElapsedSequence
Определения BleedingIndicator.c:20
bool m_IsRunning
Определения BleedingIndicator.c:8
int m_DropProbabilityRollsCount
Определения BleedingIndicator.c:25
float m_DropSpawnMinDelay
Определения BleedingIndicator.c:22
bool m_EndNow
Определения BleedingIndicator.c:7
float m_DropSpawnMaxDelay
Определения BleedingIndicator.c:23
void TrySpawnNextDrop()
Определения BleedingIndicator.c:128
bool IsRunning()
Определения tools.c:264

Перекрестные ссылки IsRunning(), IsRunningDrops(), m_ActiveDrops, m_ActiveDropsCount, m_CleanupQueue, m_CurrentDropProbabilityStep, DbgBleedingIndicationStaticInfo::m_DbgSequenceDuration, DbgBleedingIndicationStaticInfo::m_DbgUseOverrideValues, m_DropProbabilityArray, m_DropProbabilityRollsCount, m_DropSpawnMaxDelay, m_DropSpawnMinDelay, m_DropSpawnsQueued, m_EndNow, m_Initialized, m_IsRunning, m_LastDropSpawnTime, m_SequenceDuration, m_SequenceTick, m_Terminating, m_TimeElapsedSequence, m_TimeElapsedTotal, Math::RandomFloat01(), ResetSequence(), StartRunningDrops() и TrySpawnNextDrop().