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

◆ OnTick()

void SymptomManager::OnTick ( float deltatime,
int pCurrentCommandID,
HumanMovementState movement_state )
inlineprivate

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

225 {
226 // pCurrentCommandID might be the initial value, but the system itself requires
227 // current value, so retrieve the current value from player instead
228 m_CurrentCommandID = m_Player.GetCurrentCommandID();
230 {
232
234 m_Player.SetActivePrimarySymptomID(m_SymptomQueuePrimary.Get(m_ActiveSymptomIndexPrimary).GetType());
235 }
236
237 UpdateActiveSymptoms(deltatime);
238
239 if ( m_AnimMeta )
240 {
241 if ( m_AnimMeta.IsDestroyReqested() )
242 {
243 m_AnimMeta = null;
244 }
245 }
246
247 if ( m_AnimMeta )
248 {
249
250 //anim requested
251 if ( !m_AnimMeta.IsPlaying() )
252 {
253 // not playing yet and not possible to play
254 SymptomBase symptom = m_AvailableSymptoms.Get( m_AnimMeta.m_StateType );
255 if ( symptom && !symptom.CanActivate() )
256 {
257 m_AnimMeta = null;
258 }
259 else if ( m_AnimMeta.PlayRequest() == EAnimPlayState.FAILED )
260 {
262 }
263 }
264 else
265 {
266 m_AnimMeta.Update(movement_state);
267 }
268 }
269
270 #ifdef DIAG_DEVELOPER
271 #ifndef SERVER //must be here !!!
272 if ( DiagMenu.GetBool(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_SHOW) )
273 {
274 //DisplayDebug(true);
275 array<ref Param> primary_debug = PrepareClientDebug(m_SymptomQueuePrimary);
276 array<ref Param> secondary_debug = PrepareClientDebug(m_SymptomQueueSecondary);
277
278 DisplayDebug1("Symptoms Client", 50, primary_debug, secondary_debug);
279 DisplayDebug2("Symptoms Server", 300, m_SymptomQueueServerDbgPrimary, m_SymptomQueueServerDbgSecondary);
280 ShowAvailableSymptoms();
281 }
282 else
283 {
284 CleanDebug1("Symptoms Client", 50);
285 CleanDebug2("Symptoms Server", 300);
286 CleanAvailableSymptoms();
287 }
288
289 int HMPRange = DiagMenu.GetRangeValue(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_TOGGLE_HMP);
290 if (HMPRange == 1 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) == 0)
291 {
292 QueueUpSecondarySymptomEx(SymptomIDs.SYMPTOM_HMP_SEVERE);
293 }
294 else if (HMPRange == 0 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) > 0)
295 {
296 RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
297 }
298 #endif
299 #endif
300 }
DiagMenuIDs
Определения EDiagMenuIDs.c:2
eAnimFinishType
Определения SmptAnimMeta.c:2
EAnimPlayState
Определения StateManager.c:38
bool CanActivate()
Определения StateBase.c:348
PlayerBase m_Player
Определения StateManager.c:49
ref SmptAnimMetaBase m_AnimMeta
Определения StateManager.c:73
ref map< int, int > m_ActiveSymptomTypes
Определения StateManager.c:51
ref array< ref Param > m_SymptomQueueServerDbgPrimary
Определения StateManager.c:60
ref map< int, ref SymptomBase > m_AvailableSymptoms
Определения StateManager.c:50
SymptomBase QueueUpSecondarySymptomEx(int symptom_id, int uid=-1)
Определения StateManager.c:513
void RemoveSecondarySymptom(int symptom_id)
Removes a single Symptom.
Определения StateManager.c:531
ref array< ref SymptomBase > m_SymptomQueueSecondary
Определения StateManager.c:54
int m_CurrentCommandID
Определения StateManager.c:66
int m_ActiveSymptomIndexPrimary
Определения StateManager.c:65
ref array< ref SymptomBase > m_SymptomQueuePrimary
Определения StateManager.c:53
void OnAnimationFinished(eAnimFinishType type=eAnimFinishType.SUCCESS)
Определения StateManager.c:162
ref array< ref Param > m_SymptomQueueServerDbgSecondary
Определения StateManager.c:61
void UpdateActiveSymptoms(float deltatime)
Определения StateManager.c:323
int FindFirstAvailableSymptomIndex()
Определения StateManager.c:560

Перекрестные ссылки 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().