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

◆ OnTick()

void OnTick ( float deltatime,
int pCurrentCommandID,
HumanMovementState movement_state )

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

285 {
286 // pCurrentCommandID might be the initial value, but the system itself requires
287 // current value, so retrieve the current value from player instead
288 m_CurrentCommandID = m_Player.GetCurrentCommandID();
290 {
292
294 m_Player.SetActivePrimarySymptomID(m_SymptomQueuePrimary.Get(m_ActiveSymptomIndexPrimary).GetType());
295 }
296
297 UpdateActiveSymptoms(deltatime);
298
299 if ( m_AnimMeta )
300 {
301 if ( m_AnimMeta.IsDestroyReqested() )
302 {
303 m_AnimMeta = null;
304 }
305 }
306
307 if ( m_AnimMeta )
308 {
309
310 //anim requested
311 if ( !m_AnimMeta.IsPlaying() )
312 {
313 // not playing yet and not possible to play
314 SymptomBase symptom = m_AvailableSymptoms.Get( m_AnimMeta.m_StateType );
315 if ( symptom && !symptom.CanActivate() )
316 {
317 m_AnimMeta = null;
318 }
319 else if ( m_AnimMeta.PlayRequest() == EAnimPlayState.FAILED )
320 {
322 }
323 }
324 else
325 {
326 m_AnimMeta.Update(movement_state);
327 }
328 }
329
330 #ifdef DIAG_DEVELOPER
331 #ifndef SERVER //must be here !!!
332 if ( DiagMenu.GetBool(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_SHOW) )
333 {
334 //DisplayDebug(true);
335 array<ref Param> primary_debug = PrepareClientDebug(m_SymptomQueuePrimary);
336 array<ref Param> secondary_debug = PrepareClientDebug(m_SymptomQueueSecondary);
337
338 DisplayDebug1("Symptoms Client", 50, primary_debug, secondary_debug);
339 DisplayDebug2("Symptoms Server", 300, m_SymptomQueueServerDbgPrimary, m_SymptomQueueServerDbgSecondary);
340 ShowAvailableSymptoms();
341 }
342 else
343 {
344 CleanDebug1("Symptoms Client", 50);
345 CleanDebug2("Symptoms Server", 300);
346 CleanAvailableSymptoms();
347 }
348
349 int HMPRange = DiagMenu.GetRangeValue(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_TOGGLE_HMP);
350 if (HMPRange == 1 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) == 0)
351 {
352 QueueUpSecondarySymptomEx(SymptomIDs.SYMPTOM_HMP_SEVERE);
353 }
354 else if (HMPRange == 0 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) > 0)
355 {
356 RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
357 }
358 #endif
359 #endif
360 }
DiagMenuIDs
Определения EDiagMenuIDs.c:2
DayZPlayer m_Player
Определения Hand_Events.c:42
eAnimFinishType
Определения SmptAnimMeta.c:2
ref array< ref Param > m_SymptomQueueServerDbgPrimary
Определения StateManager.c:117
ref map< int, int > m_ActiveSymptomTypes
Определения StateManager.c:108
SymptomBase QueueUpSecondarySymptomEx(int symptom_id, int uid=-1)
Определения StateManager.c:574
int m_ActiveSymptomIndexPrimary
Определения StateManager.c:122
void RemoveSecondarySymptom(int symptom_id)
Removes a single Symptom.
Определения StateManager.c:592
ref array< ref SymptomBase > m_SymptomQueueSecondary
Определения StateManager.c:111
ref array< ref SymptomBase > m_SymptomQueuePrimary
Определения StateManager.c:110
void UpdateActiveSymptoms(float deltatime)
Определения StateManager.c:383
ref SmptAnimMetaBase m_AnimMeta
Определения StateManager.c:130
EAnimPlayState
Определения StateManager.c:41
void OnAnimationFinished(eAnimFinishType type=eAnimFinishType.SUCCESS)
Определения StateManager.c:222
int FindFirstAvailableSymptomIndex()
Определения StateManager.c:621
ref map< int, ref SymptomBase > m_AvailableSymptoms
Определения StateManager.c:107
int m_CurrentCommandID
Определения StateManager.c:123
ref array< ref Param > m_SymptomQueueServerDbgSecondary
Определения StateManager.c:118
Определения EnDebug.c:241
bool CanActivate()
Определения StateBase.c:354
Определения StateBase.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
static proto float GetRangeValue(int id)
Get range value at the given script id.

Перекрестные ссылки SymptomBase::CanActivate(), FindFirstAvailableSymptomIndex(), DiagMenu::GetBool(), DiagMenu::GetRangeValue(), m_ActiveSymptomIndexPrimary, m_ActiveSymptomTypes, m_AnimMeta, m_AvailableSymptoms, m_CurrentCommandID, m_Player, m_SymptomQueuePrimary, m_SymptomQueueSecondary, m_SymptomQueueServerDbgPrimary, m_SymptomQueueServerDbgSecondary, OnAnimationFinished(), QueueUpSecondarySymptomEx(), RemoveSecondarySymptom() и UpdateActiveSymptoms().