DayZ 1.28
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 строка 675

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

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

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