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

◆ RandomizeFSMState()

void Weapon::RandomizeFSMState ( )
inlineprotected

With the parameters given, selects a random suitable state for the FSM of the weapon @WARNING: Weapon_Base.Synchronize call might be needed, if this method is called while clients are connected.

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

674 {
675 if (m_fsm)
676 {
677 int mi = GetCurrentMuzzle();
678 Magazine mag = GetMagazine(mi);
679 bool has_mag = mag != null;
680 bool has_bullet = !IsChamberEmpty(mi);
681 bool has_jam = IsJammed();
682 array<MuzzleState> muzzleStates = GetMuzzleStates();
683 m_fsm.RandomizeFSMStateEx(muzzleStates, has_mag, has_jam);
685 }
686 }
array< MuzzleState > GetMuzzleStates()
Helper method for RandomizeFSMState.
Определения Weapon_Base.c:689
ref WeaponFSM m_fsm
weapon abilities
Определения Weapon_Base.c:49
void ForceSyncSelectionState()
Определения Weapon_Base.c:460
bool IsJammed()
Определения Weapon_Base.c:405

Перекрестные ссылки ForceSyncSelectionState(), GetMuzzleStates(), IsJammed() и m_fsm.

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