475 {
476 #ifdef DIAG_DEVELOPER
477 if (m_StaminaDisabled)
478 return;
479 #endif
480
482 return;
483
484
485 array<int> expiredCooldowns = new array<int>();
487 {
488 cooldownParams.param1 -= deltaT;
489 if (cooldownParams.param1 <= 0)
490 {
491 expiredCooldowns.Insert(modifier);
492 }
493 }
494
495
496 foreach (int expiredModifier : expiredCooldowns)
497 {
499 }
500
501
503
504
506
507 bool isAiOrSingleplayer =
m_Player.IsAuthorityOwner();
508 bool isServerOrSingleplayer =
m_Player.IsAuthority();
509
510
511 if (isServerOrSingleplayer)
512 {
516 {
519 }
520 }
521 else
522 {
523 PlayerBaseMove move = PlayerBaseMove.Cast(
m_Player.GetNextMove());
524 if (move)
525 {
528 }
529 }
530
531 if (isAiOrSingleplayer)
532 {
535 }
536
537
540
541
543
546
552 }
Param1< float > StaminaCooldownParams
void RecalculateStaminaCap()
void CheckStaminaState()
check if the stamina is completely depleted
ref map< int, ref StaminaCooldownParams > m_CooldownMap
bool m_IsStaminaGainBonusCached
bool m_MovementStateChanged
bool HasMovementStateChanged()
void ProcessStaminaChanges(float deltaT, bool isServerOrSingleplayer)
void ProcessMovementState()
void ResetCooldown(int modifier=-1)