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

Закрытые члены

void Init ()
 
int GetStorageVersion ()
 
void AutoactivateSymptoms ()
 
void SymptomManager (PlayerBase player)
 
void OnPlayerKilled ()
 
SymptomBase GetSymptomByUID (int SYMPTOM_uid)
 
PlayerBase GetPlayer ()
 
void RegisterSymptom (SymptomBase Symptom)
 
void OnAnimationFinished (eAnimFinishType type=eAnimFinishType.SUCCESS)
 
void OnAnimationStarted ()
 
int CreateUniqueID ()
 
bool IsUIDUsed (int uid)
 
string GetSymptomName (int symptom_id)
 
SmptAnimMetaBase SpawnAnimMetaObject (int symptom_id)
 
void RequestSymptomExit (int SYMPTOM_uid)
 Exits a specific Symptom with a given UID.
 
bool IsSymptomPrimary (int symptom_id)
 
void OnInputUserDataReceived (ParamsReadContext ctx)
 
int GetCurrentCommandID ()
 
void OnTick (float deltatime, int pCurrentCommandID, HumanMovementState movement_state)
 
void SetAnimation (ParamsReadContext ctx)
 
void UpdateActiveSymptoms (float deltatime)
 
void OnSymptomExit (SymptomBase Symptom, int uid)
 
int GetSymptomMaxCount (int symptom_id)
 
int GetSymptomCount (int symptom_id)
 
void IncreaseSymptomCount (int symptom_id)
 
void DecreaseSymptomCount (int symptom_id)
 
SymptomBase SpawnSymptom (int symptom_id, int uid=-1)
 
void CleanUpPrimaryQueue ()
 
SymptomBase QueueUpPrimarySymptom (int symptom_id, int uid=-1)
 
void QueueUpSecondarySymptom (int symptom_id, int uid=-1)
 
SymptomBase QueueUpSecondarySymptomEx (int symptom_id, int uid=-1)
 
void RemoveSecondarySymptom (int symptom_id)
 Removes a single Symptom.
 
SymptomBase GetCurrentPrimaryActiveSymptom ()
 
int FindFirstAvailableSymptomIndex ()
 
int ComparePriority (int prio1, int prio2)
 
int GetSymptomPriority (int symptom_id)
 
void OnRPC (int rpc_type, ParamsReadContext ctx)
 
void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 

Закрытые данные

PlayerBase m_Player
 
ref map< int, ref SymptomBasem_AvailableSymptoms
 
ref map< int, intm_ActiveSymptomTypes
 
ref array< ref SymptomBasem_SymptomQueuePrimary
 
ref array< ref SymptomBasem_SymptomQueueSecondary
 
ref map< int, SymptomBasem_SymptomsUIDs
 
ref array< ref Paramm_SymptomQueueServerDbg
 
ref array< ref Paramm_SymptomQueueServerDbgPrimary
 
ref array< ref Paramm_SymptomQueueServerDbgSecondary
 
ref Timer m_Timer
 
int m_ActiveSymptomIndexPrimary = -1
 
int m_CurrentCommandID
 
const int STORAGE_VERSION = 121
 
bool m_ShowDebug = false
 
bool m_ShowDebug2 = false
 
ref SmptAnimMetaBase m_AnimMeta
 

Подробное описание

Конструктор(ы)

◆ SymptomManager()

void SymptomManager ( PlayerBase player)
inlineprivate
110 {
117
120
122
123 Init();
125 }
Definition EntityAI.c:95
ref array< ref Param > m_SymptomQueueServerDbgPrimary
Definition StateManager.c:59
ref map< int, int > m_ActiveSymptomTypes
Definition StateManager.c:50
void Init()
Definition StateManager.c:74
ref array< ref Param > m_SymptomQueueServerDbg
Definition StateManager.c:58
ref array< ref SymptomBase > m_SymptomQueueSecondary
Definition StateManager.c:53
PlayerBase m_Player
Definition StateManager.c:48
ref array< ref SymptomBase > m_SymptomQueuePrimary
Definition StateManager.c:52
ref map< int, SymptomBase > m_SymptomsUIDs
Definition StateManager.c:55
void AutoactivateSymptoms()
Definition StateManager.c:99
ref map< int, ref SymptomBase > m_AvailableSymptoms
Definition StateManager.c:49
ref array< ref Param > m_SymptomQueueServerDbgSecondary
Definition StateManager.c:60

Перекрестные ссылки AutoactivateSymptoms(), Init(), m_ActiveSymptomTypes, m_AvailableSymptoms, m_Player, m_SymptomQueuePrimary, m_SymptomQueueSecondary, m_SymptomQueueServerDbg, m_SymptomQueueServerDbgPrimary, m_SymptomQueueServerDbgSecondary и m_SymptomsUIDs.

Методы

◆ AutoactivateSymptoms()

void AutoactivateSymptoms ( )
inlineprivate
100 {
101 if ( GetGame().IsClient() )
102 {
103 return;
104 }
105
106 QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_BLOODLOSS);
107 }
void QueueUpSecondarySymptom(int symptom_id, int uid=-1)
Definition StateManager.c:501
proto native CGame GetGame()

Перекрестные ссылки GetGame() и QueueUpSecondarySymptom().

Используется в SymptomManager().

◆ CleanUpPrimaryQueue()

void CleanUpPrimaryQueue ( )
inlineprivate
464 {
466 {
467 symptom.RequestDestroy();
468 }
469 }
Definition StateBase.c:2

Перекрестные ссылки m_SymptomQueuePrimary.

Используется в OnRPC().

◆ ComparePriority()

int ComparePriority ( int prio1,
int prio2 )
inlineprivate
563 {
564 if ( prio1 > prio2 )
565 {
566 return 1;
567 }
568 else if ( prio2 > prio1 )
569 {
570 return 2;
571 }
572 return 0;
573 }

Используется в QueueUpPrimarySymptom().

◆ CreateUniqueID()

int CreateUniqueID ( )
inlineprivate
175 {
176 int uid = Math.RandomInt(1, 2147483647);
177 if (!IsUIDUsed(uid))
178 return uid;
179 else
180 return CreateUniqueID();
181 }
Definition EnMath.c:7
int CreateUniqueID()
Definition StateManager.c:174
bool IsUIDUsed(int uid)
Definition StateManager.c:183
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

Перекрестные ссылки CreateUniqueID(), IsUIDUsed() и Math::RandomInt().

Используется в CreateUniqueID() и SpawnSymptom().

◆ DecreaseSymptomCount()

void DecreaseSymptomCount ( int symptom_id)
inlineprivate
424 {
425 if ( m_ActiveSymptomTypes.Contains(symptom_id) )
426 {
427 if ( m_ActiveSymptomTypes.Get(symptom_id) == 1)
429 else
431 }
432 }

Перекрестные ссылки m_ActiveSymptomTypes.

Используется в OnSymptomExit().

◆ FindFirstAvailableSymptomIndex()

int FindFirstAvailableSymptomIndex ( )
inlineprivate
551 {
552 for (int i = 0; i < m_SymptomQueuePrimary.Count();i++)
553 {
554 if ( m_SymptomQueuePrimary.Get(i).CanActivate() )
555 {
556 return i;
557 }
558 }
559 return -1;
560 }

Перекрестные ссылки m_SymptomQueuePrimary.

Используется в OnTick().

◆ GetCurrentCommandID()

int GetCurrentCommandID ( )
inlineprivate
218 {
219 return m_CurrentCommandID;
220 }
int m_CurrentCommandID
Definition StateManager.c:65

Перекрестные ссылки m_CurrentCommandID.

Используется в VomitSymptom::CanActivate().

◆ GetCurrentPrimaryActiveSymptom()

SymptomBase GetCurrentPrimaryActiveSymptom ( )
inlineprivate
534 {
535 if ( GetGame().IsServer() )
536 {
538 {
540 }
541 }
542 if ( !GetGame().IsDedicatedServer() )
543 {
544 if ( m_SymptomQueuePrimary.Count() > 0 )
545 return m_SymptomQueuePrimary.Get(0);
546 }
547 return NULL;
548 }
int m_ActiveSymptomIndexPrimary
Definition StateManager.c:64

Перекрестные ссылки GetGame(), m_ActiveSymptomIndexPrimary и m_SymptomQueuePrimary.

Используется в AnimFinished(), OnAnimationStarted() и UpdateActiveSymptoms().

◆ GetPlayer()

PlayerBase GetPlayer ( )
inlineprivate
142 {
143 return m_Player;
144 }

Перекрестные ссылки m_Player.

◆ GetStorageVersion()

int GetStorageVersion ( )
inlineprivate
94 {
95 return STORAGE_VERSION;
96 }
const int STORAGE_VERSION
Definition StateManager.c:67

Перекрестные ссылки STORAGE_VERSION.

◆ GetSymptomByUID()

SymptomBase GetSymptomByUID ( int SYMPTOM_uid)
inlineprivate
137 {
138 return m_SymptomsUIDs.Get(SYMPTOM_uid);
139 }

Перекрестные ссылки m_SymptomsUIDs.

◆ GetSymptomCount()

int GetSymptomCount ( int symptom_id)
inlineprivate
404 {
405 if ( m_ActiveSymptomTypes.Contains(symptom_id) )
407 else
408 return -1;
409 }

Перекрестные ссылки m_ActiveSymptomTypes.

Используется в QueueUpPrimarySymptom() и QueueUpSecondarySymptomEx().

◆ GetSymptomMaxCount()

int GetSymptomMaxCount ( int symptom_id)
inlineprivate
398 {
399 return m_AvailableSymptoms.Get(symptom_id).GetMaxCount();
400 }

Перекрестные ссылки m_AvailableSymptoms.

Используется в QueueUpPrimarySymptom() и QueueUpSecondarySymptomEx().

◆ GetSymptomName()

string GetSymptomName ( int symptom_id)
inlineprivate
189 {
190 return m_AvailableSymptoms.Get(symptom_id).GetName();
191 }

Перекрестные ссылки m_AvailableSymptoms.

◆ GetSymptomPriority()

int GetSymptomPriority ( int symptom_id)
inlineprivate
576 {
577 return m_AvailableSymptoms.Get(symptom_id).GetPriority();
578 }

Перекрестные ссылки m_AvailableSymptoms.

Используется в QueueUpPrimarySymptom().

◆ IncreaseSymptomCount()

void IncreaseSymptomCount ( int symptom_id)
inlineprivate
412 {
413 if ( m_ActiveSymptomTypes.Contains(symptom_id) )
414 {
416 }
417 else
418 {
420 }
421 }

Перекрестные ссылки m_ActiveSymptomTypes.

Используется в SpawnSymptom().

◆ Init()

void Init ( )
inlineprivate

Перекрестные ссылки RegisterSymptom().

Используется в SymptomManager().

◆ IsSymptomPrimary()

bool IsSymptomPrimary ( int symptom_id)
inlineprivate
209 {
210 return m_AvailableSymptoms.Get(symptom_id).IsPrimary();
211 }

Перекрестные ссылки m_AvailableSymptoms.

Используется в OnStoreLoad().

◆ IsUIDUsed()

bool IsUIDUsed ( int uid)
inlineprivate
184 {
185 return m_SymptomsUIDs.Contains(uid);
186 }

Перекрестные ссылки m_SymptomsUIDs.

Используется в CreateUniqueID().

◆ OnAnimationFinished()

void OnAnimationFinished ( eAnimFinishType type = eAnimFinishType.SUCCESS)
inlineprivate
161 {
162 if (m_AnimMeta)
163 {
164 m_AnimMeta.AnimFinished(type);
165 }
166 }
ref SmptAnimMetaBase m_AnimMeta
Definition StateManager.c:72

Перекрестные ссылки m_AnimMeta.

Используется в OnTick(), PlayRequest() и Update().

◆ OnAnimationStarted()

void OnAnimationStarted ( )
inlineprivate
169 {
172 }
void AnimationStart()
Definition StateBase.c:327
SymptomBase GetCurrentPrimaryActiveSymptom()
Definition StateManager.c:533

Перекрестные ссылки SymptomBase::AnimationStart() и GetCurrentPrimaryActiveSymptom().

Используется в Update().

◆ OnInputUserDataReceived()

void OnInputUserDataReceived ( ParamsReadContext ctx)
inlineprivate
214 {
215 }

◆ OnPlayerKilled()

void OnPlayerKilled ( )
inlineprivate
128 {
130 symptomPrimary.OnOwnerKilled();
131
133 symptomSecondary.OnOwnerKilled();
134 }

Перекрестные ссылки m_SymptomQueuePrimary и m_SymptomQueueSecondary.

◆ OnRPC()

void OnRPC ( int rpc_type,
ParamsReadContext ctx )
inlineprivate
581 {
585
586 bool is_primary = m_AvailableSymptoms.Get(symptom_id).IsPrimary();
587
588 if ( rpc_type == ERPCs.RPC_PLAYER_SYMPTOM_ON )
589 {
590 if ( is_primary )
591 {
594 }
595 else
596 {
598 }
599 }
600 else if ( rpc_type == ERPCs.RPC_PLAYER_SYMPTOM_OFF )
601 {
602 if ( is_primary )
603 {
605 }
606 else
607 {
609 }
610 }
611 }
ERPCs
Definition ERPCs.c:2
Definition UtilityClasses.c:10
static ref Param2< int, int > PARAM2_INT_INT
Definition UtilityClasses.c:16
void RemoveSecondarySymptom(int symptom_id)
Removes a single Symptom.
Definition StateManager.c:521
SymptomBase QueueUpPrimarySymptom(int symptom_id, int uid=-1)
Definition StateManager.c:471
void CleanUpPrimaryQueue()
Definition StateManager.c:463

Перекрестные ссылки CleanUpPrimaryQueue(), m_AvailableSymptoms, CachedObjectsParams::PARAM2_INT_INT, QueueUpPrimarySymptom(), QueueUpSecondarySymptom() и RemoveSecondarySymptom().

◆ OnStoreLoad()

bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate
637 {
639
640 if (ctx.Read(m_SaveQueue))
641 {
642 for ( int i = 0; i < m_SaveQueue.Count(); i++ )
643 {
644 int id = m_SaveQueue.Get(i);
645
646 if ( IsSymptomPrimary(id) )
647 {
649 }
650 else
651 {
653 }
654 }
655 return true;
656 }
657 else
658 {
659 return false;
660 }
661 }
bool IsSymptomPrimary(int symptom_id)
Definition StateManager.c:208

Перекрестные ссылки IsSymptomPrimary(), QueueUpPrimarySymptom() и QueueUpSecondarySymptom().

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)
inlineprivate
614 {
616
617 for ( int i = 0; i < m_SymptomQueuePrimary.Count(); i++ )
618 {
619 if ( m_SymptomQueuePrimary.Get(i).IsPersistent() )
620 {
621 m_SaveQueue.Insert( m_SymptomQueuePrimary.Get(i).GetType() );
622 }
623 }
624
625 for ( i = 0; i < m_SymptomQueueSecondary.Count(); i++ )
626 {
627 if ( m_SymptomQueueSecondary.Get(i).IsPersistent() )
628 {
629 m_SaveQueue.Insert( m_SymptomQueueSecondary.Get(i).GetType() );
630 }
631 }
632
633 ctx.Write( m_SaveQueue );
634 }

Перекрестные ссылки m_SymptomQueuePrimary и m_SymptomQueueSecondary.

◆ OnSymptomExit()

void OnSymptomExit ( SymptomBase Symptom,
int uid )
inlineprivate
353 {
354 bool is_primary;
355 if ( Symptom )
356 {
357 is_primary = Symptom.IsPrimary();
358 DecreaseSymptomCount(Symptom.GetType());
359 }
360
361 if (m_SymptomsUIDs.Contains(uid))
362 m_SymptomsUIDs.Remove(uid);
363 else
364 Debug.LogError("Symptom with this UID does not exist", "PlayerSymptoms");
365
366 if (is_primary)
367 {
368 for (int i = 0; i < m_SymptomQueuePrimary.Count(); i++)
369 {
370 if ( m_SymptomQueuePrimary.Get(i) == Symptom )
371 {
372 m_SymptomQueuePrimary.RemoveOrdered(i);
373 break;
374 }
375 }
376 }
377 else
378 {
379 for (i = 0; i < m_SymptomQueueSecondary.Count(); i++)
380 {
382 {
383 m_SymptomQueueSecondary.RemoveOrdered(i);
384 break;
385 }
386 }
387 }
389 m_Player.SetActivePrimarySymptomID(0);
390
391 #ifdef DIAG_DEVELOPER
393 #endif
394 }
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:259
void DecreaseSymptomCount(int symptom_id)
Definition StateManager.c:423

Перекрестные ссылки DecreaseSymptomCount(), GetGame(), Debug::LogError(), m_ActiveSymptomIndexPrimary, m_Player, m_SymptomQueuePrimary, m_SymptomQueueSecondary и m_SymptomsUIDs.

Используется в SymptomBase::OnDestructed().

◆ OnTick()

void OnTick ( float deltatime,
int pCurrentCommandID,
HumanMovementState movement_state )
inlineprivate
223 {
224 // pCurrentCommandID might be the initial value, but the system itself requires
225 // current value, so retrieve the current value from player instead
226 m_CurrentCommandID = m_Player.GetCurrentCommandID();
228 {
230
232 m_Player.SetActivePrimarySymptomID(m_SymptomQueuePrimary.Get(m_ActiveSymptomIndexPrimary).GetType());
233 }
234
236
237 if ( m_AnimMeta )
238 {
239 if ( m_AnimMeta.IsDestroyReqested() )
240 {
242 }
243 }
244
245 if ( m_AnimMeta )
246 {
247
248 //anim requested
249 if ( !m_AnimMeta.IsPlaying() )
250 {
251 // not playing yet and not possible to play
253 if ( symptom && !symptom.CanActivate() )
254 {
256 }
257 else if ( m_AnimMeta.PlayRequest() == EAnimPlayState.FAILED )
258 {
260 }
261 }
262 else
263 {
265 }
266 }
267
268 #ifdef DIAG_DEVELOPER
269 #ifndef SERVER //must be here !!!
270 if ( DiagMenu.GetBool(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_SHOW) )
271 {
272 //DisplayDebug(true);
275
276 DisplayDebug1("Symptoms Client", 50, primary_debug, secondary_debug);
279 }
280 else
281 {
282 CleanDebug1("Symptoms Client", 50);
283 CleanDebug2("Symptoms Server", 300);
285 }
286
287 int HMPRange = DiagMenu.GetRangeValue(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_TOGGLE_HMP);
288 if (HMPRange == 1 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) == 0)
289 {
290 QueueUpSecondarySymptomEx(SymptomIDs.SYMPTOM_HMP_SEVERE);
291 }
292 else if (HMPRange == 0 && m_ActiveSymptomTypes.Get(SymptomIDs.SYMPTOM_HMP_SEVERE) > 0)
293 {
294 RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
295 }
296 #endif
297 #endif
298 }
DiagMenuIDs
Definition EDiagMenuIDs.c:2
eAnimFinishType
Definition SmptAnimMeta.c:2
EAnimPlayState
Definition StateManager.c:37
Definition EnDebug.c:233
SymptomBase QueueUpSecondarySymptomEx(int symptom_id, int uid=-1)
Definition StateManager.c:506
void UpdateActiveSymptoms(float deltatime)
Definition StateManager.c:321
void OnAnimationFinished(eAnimFinishType type=eAnimFinishType.SUCCESS)
Definition StateManager.c:160
int FindFirstAvailableSymptomIndex()
Definition StateManager.c:550
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.

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

◆ QueueUpPrimarySymptom()

SymptomBase QueueUpPrimarySymptom ( int symptom_id,
int uid = -1 )
inlineprivate
472 {
475 return null;
476
477 for (int i = 0; i < m_SymptomQueuePrimary.Count(); i++)
478 {
479 if (m_SymptomQueuePrimary.Get(i).CanBeInterupted() && ComparePriority(GetSymptomPriority(symptom_id), m_SymptomQueuePrimary.Get(i).GetPriority()) == 1)
480 {
483
485 m_SymptomQueuePrimary.Get(MAX_QUEUE_SIZE).RequestDestroy();// no need to remove from the array, that's done via Symptom callback on destruct
486
487 break;
488 }
489 }
490 if ( !symptom && m_SymptomQueuePrimary.Count() < MAX_QUEUE_SIZE)
491 {
494 }
495 #ifdef DIAG_DEVELOPER
497 #endif
498 return symptom;
499 }
const int MAX_QUEUE_SIZE
Definition StateManager.c:44
int GetSymptomPriority(int symptom_id)
Definition StateManager.c:575
SymptomBase SpawnSymptom(int symptom_id, int uid=-1)
Definition StateManager.c:434
int GetSymptomCount(int symptom_id)
Definition StateManager.c:403
int ComparePriority(int prio1, int prio2)
Definition StateManager.c:562
int GetSymptomMaxCount(int symptom_id)
Definition StateManager.c:397

Перекрестные ссылки ComparePriority(), GetSymptomCount(), GetSymptomMaxCount(), GetSymptomPriority(), m_SymptomQueuePrimary, MAX_QUEUE_SIZE и SpawnSymptom().

Используется в OnRPC() и OnStoreLoad().

◆ QueueUpSecondarySymptom()

void QueueUpSecondarySymptom ( int symptom_id,
int uid = -1 )
inlineprivate

Перекрестные ссылки QueueUpSecondarySymptomEx().

Используется в AutoactivateSymptoms(), OnRPC() и OnStoreLoad().

◆ QueueUpSecondarySymptomEx()

SymptomBase QueueUpSecondarySymptomEx ( int symptom_id,
int uid = -1 )
inlineprivate
507 {
509 return null;
510
511 if (m_AvailableSymptoms.Get(symptom_id).IsPrimary())
512 return null;
513
515
517 return Symptom;
518 }

Перекрестные ссылки GetSymptomCount(), GetSymptomMaxCount(), m_AvailableSymptoms, m_SymptomQueueSecondary и SpawnSymptom().

Используется в OnTick() и QueueUpSecondarySymptom().

◆ RegisterSymptom()

void RegisterSymptom ( SymptomBase Symptom)
inlineprivate
147 {
148 Symptom.Init(this, m_Player,0);
149 int id = Symptom.GetType();
150
151 if (m_AvailableSymptoms.Contains(id))
152 {
153 ErrorEx(string.Format("Symptom %1 already registered!", Symptom.GetName()));
154 return;
155 }
156
157 m_AvailableSymptoms.Insert(id, Symptom);
158 }
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, m_AvailableSymptoms и m_Player.

Используется в Init().

◆ RemoveSecondarySymptom()

void RemoveSecondarySymptom ( int symptom_id)
inlineprivate

Removes a single Symptom.

522 {
523 for (int i = 0; i < m_SymptomQueueSecondary.Count();i++)
524 {
525 if ( m_SymptomQueueSecondary.Get(i) && m_SymptomQueueSecondary.Get(i).GetType() == symptom_id )
526 {
527 m_SymptomQueueSecondary.Get(i).RequestDestroy();
528 return;
529 }
530 }
531 }

Перекрестные ссылки m_SymptomQueueSecondary.

Используется в OnRPC() и OnTick().

◆ RequestSymptomExit()

void RequestSymptomExit ( int SYMPTOM_uid)
inlineprivate

Exits a specific Symptom with a given UID.

203 {
205 m_SymptomsUIDs.Get(SYMPTOM_uid).RequestDestroy();
206 }

Перекрестные ссылки m_SymptomsUIDs.

◆ SetAnimation()

void SetAnimation ( ParamsReadContext ctx)
inlineprivate
301 {
302 if (m_AnimMeta)
303 {
304 // animation meta already exists
305 // pass
306 }
307 else
308 {
309 int state_type;
310 if (ctx.Read(state_type))
311 {
313 if (m_AnimMeta)
314 {
315 m_AnimMeta.Init(ctx, this, m_Player);
316 }
317 }
318 }
319 }
SmptAnimMetaBase SpawnAnimMetaObject(int symptom_id)
Definition StateManager.c:193

Перекрестные ссылки m_AnimMeta, m_Player и SpawnAnimMetaObject().

◆ SpawnAnimMetaObject()

SmptAnimMetaBase SpawnAnimMetaObject ( int symptom_id)
inlineprivate
194 {
195 SmptAnimMetaBase animMeta = m_AvailableSymptoms.Get(symptom_id).SpawnAnimMetaObject();
196 animMeta.m_StateType = symptom_id;
197
198 return animMeta;
199 }
Definition SmptAnimMeta.c:83

Перекрестные ссылки m_AvailableSymptoms.

Используется в SetAnimation().

◆ SpawnSymptom()

SymptomBase SpawnSymptom ( int symptom_id,
int uid = -1 )
inlineprivate
435 {
437 {
438 SymptomBase symptom = SymptomBase.Cast(m_AvailableSymptoms.Get(symptom_id).ClassName().ToType().Spawn());
439 if (uid == -1)
440 {
442 }
443
444 symptom.Init(this, m_Player,uid);
445
446 if ( m_SymptomsUIDs.Contains(uid) )
447 ErrorEx(string.Format("Symptoms: Unique ID (=%1) already exists!", uid));
448
449 m_SymptomsUIDs.Insert(uid, symptom);
451
452 return symptom;
453 }
454
455 if (!symptom)
456 {
457 Error("Symptom not registered");
458 }
459
460 return null;
461 }
void IncreaseSymptomCount(int symptom_id)
Definition StateManager.c:411
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки CreateUniqueID(), Error(), ErrorEx, IncreaseSymptomCount(), m_AvailableSymptoms, m_Player и m_SymptomsUIDs.

Используется в QueueUpPrimarySymptom() и QueueUpSecondarySymptomEx().

◆ UpdateActiveSymptoms()

void UpdateActiveSymptoms ( float deltatime)
inlineprivate
322 {
323 //if( GetGame().IsClient() && !m_Player.IsPlayer() ) return;
324 //primary
326 {
327 if ( !GetCurrentPrimaryActiveSymptom().IsActivated() )
328 {
329 if ( GetCurrentPrimaryActiveSymptom().CanActivate() )
331 }
332 if ( GetCurrentPrimaryActiveSymptom().IsActivated() )
333 {
335 }
336 }
337 //secondary
338 for (int i = 0; i < m_SymptomQueueSecondary.Count(); i++)
339 {
340 if ( m_SymptomQueueSecondary.Get(i) && !m_SymptomQueueSecondary.Get(i).IsActivated() )
341 {
342 m_SymptomQueueSecondary.Get(i).Activate();
343 }
344 else
345 {
347 }
348 }
349 }
void Update(float deltatime)
Definition StateBase.c:216
void Activate()
Definition StateBase.c:169

Перекрестные ссылки SymptomBase::Activate(), GetCurrentPrimaryActiveSymptom(), m_SymptomQueueSecondary и SymptomBase::Update().

Используется в OnTick().

Поля

◆ m_ActiveSymptomIndexPrimary

int m_ActiveSymptomIndexPrimary = -1
private

Используется в GetCurrentPrimaryActiveSymptom(), OnSymptomExit() и OnTick().

◆ m_ActiveSymptomTypes

ref map<int, int> m_ActiveSymptomTypes
private

◆ m_AnimMeta

ref SmptAnimMetaBase m_AnimMeta
private

Используется в OnAnimationFinished(), OnTick() и SetAnimation().

◆ m_AvailableSymptoms

◆ m_CurrentCommandID

int m_CurrentCommandID
private

Используется в GetCurrentCommandID() и OnTick().

◆ m_Player

◆ m_ShowDebug

bool m_ShowDebug = false
private

◆ m_ShowDebug2

bool m_ShowDebug2 = false
private

◆ m_SymptomQueuePrimary

◆ m_SymptomQueueSecondary

◆ m_SymptomQueueServerDbg

ref array<ref Param> m_SymptomQueueServerDbg
private

Используется в SymptomManager().

◆ m_SymptomQueueServerDbgPrimary

ref array<ref Param> m_SymptomQueueServerDbgPrimary
private

Используется в OnTick() и SymptomManager().

◆ m_SymptomQueueServerDbgSecondary

ref array<ref Param> m_SymptomQueueServerDbgSecondary
private

Используется в OnTick() и SymptomManager().

◆ m_SymptomsUIDs

◆ m_Timer

ref Timer m_Timer
private

◆ STORAGE_VERSION

const int STORAGE_VERSION = 121
private

Используется в GetStorageVersion().


Объявления и описания членов класса находятся в файле: