DayZ 1.26
DayZ Explorer by KGB
|
Перечисления | |
enum | MuzzleState { U = -1 , E = 0 , F = 1 , L = 2 } |
Функции | |
void | WeaponStableState (Weapon_Base w=NULL, WeaponStateBase parent=NULL, int anim_state=-1) |
void | SyncAnimState () |
override void | OnEntry (WeaponEventBase e) |
override void | OnUpdate (float dt) |
override void | OnExit (WeaponEventBase e) |
override bool | IsIdle () |
int | GetCurrentStateID () |
Weapon state properties | |
Properties defining the state in several properties for other systems Override these to set them up Several systems depends on this: WeaponFSM.RandomizeFSMState, which picks out a suitable FSM state when attaching magazine through CE WeaponFSM.ValidateAndRepair, which will attempt to identify a desync and repair the FSM state if so @WARNING So it is important to set these up correctly to prevent any desync of weapon FSM and actual wepon state | |
bool | IsRepairEnabled () |
Whether WeaponFSM.ValidateAndRepair should be applied on this state @NOTE: This property was implemented at the same time as ValARep To have it disabled by default In case there are modders who created their own state But potentially did not set up their properties correctly As having ValARep run on an improper setup would result in horrible VME spam and desync @WARNING: When enabling repair, it is imperative that all properties are set up correctly. | |
bool | HasBullet () |
Whether there is a bullet in the chamber @NOTE: This should only be false when it is empty So this is true when there is a bullet in the chamber Regardless of the bullet being loaded, firedout or jammed. | |
bool | HasMagazine () |
Whether there is a magazine attached. | |
bool | IsJammed () |
Whether the gun is jammed. | |
bool | IsDischarged () |
Whether the gun is discharged. | |
bool | IsWeaponOpen () |
Whether the gun is open. | |
void | InitMuzzleArray () |
Override with the filling of m_muzzleHasBullet. | |
bool | IsSingleState () |
Special one for when the weapon only has one singular state (like Magnum) | |
Weapon state properties helpers | |
Several helpers for better access of certain properties | |
MuzzleState | GetMuzzleState (int idx) |
Get chamber state of the muzzle at index. | |
int | GetMuzzleStateCount () |
bool | IsChamberValid (int idx) |
bool | IsChamberFiredOut (int idx) |
bool | IsChamberFull (int idx) |
void | ValidateMuzzleArray () |
Safety check and error message in case not set up correctly. | |
Переменные | |
enum MuzzleState | m_animState |
ref array< MuzzleState > | m_muzzleHasBullet = new array<MuzzleState>() |
int GetCurrentStateID | ( | ) |
MuzzleState GetMuzzleState | ( | int | idx | ) |
Get chamber state of the muzzle at index.
Перекрестные ссылки m_muzzleHasBullet.
int GetMuzzleStateCount | ( | ) |
Перекрестные ссылки m_muzzleHasBullet.
bool HasBullet | ( | ) |
Whether there is a bullet in the chamber @NOTE: This should only be false when it is empty So this is true when there is a bullet in the chamber Regardless of the bullet being loaded, firedout or jammed.
bool HasMagazine | ( | ) |
Whether there is a magazine attached.
void InitMuzzleArray | ( | ) |
Перекрестные ссылки m_muzzleHasBullet.
Используется в DoubleBarrel_Base::CanChamberBullet(), Weapon_Base::CanChamberBullet(), Weapon::CanChamberBullet(), Weapon::CanFire(), Weapon::GetMuzzleStates() и Weapon_Base::ShowBullet().
Перекрестные ссылки m_muzzleHasBullet.
Используется в Weapon::CanChamberBullet(), Weapon_Base::CanEjectBullet(), Weapon::ForceSyncSelectionState(), Weapon::GetMuzzleStates() и InventoryItemSuper::IsChamberFullEx().
Перекрестные ссылки m_muzzleHasBullet.
bool IsDischarged | ( | ) |
Whether the gun is discharged.
Используется в Weapon::CanRemoveFromHands() и ManBase::OnQuickBarSingleUse().
bool IsJammed | ( | ) |
Whether the gun is jammed.
bool IsRepairEnabled | ( | ) |
Whether WeaponFSM.ValidateAndRepair should be applied on this state @NOTE: This property was implemented at the same time as ValARep To have it disabled by default In case there are modders who created their own state But potentially did not set up their properties correctly As having ValARep run on an improper setup would result in horrible VME spam and desync @WARNING: When enabling repair, it is imperative that all properties are set up correctly.
bool IsSingleState | ( | ) |
Special one for when the weapon only has one singular state (like Magnum)
Используется в ValidateMuzzleArray().
bool IsWeaponOpen | ( | ) |
Whether the gun is open.
override void OnEntry | ( | WeaponEventBase | e | ) |
Перекрестные ссылки m_weapon и SyncAnimState().
override void OnExit | ( | WeaponEventBase | e | ) |
Перекрестные ссылки SyncAnimState().
void SyncAnimState | ( | ) |
Перекрестные ссылки Class::CastTo(), fsmDebugSpam(), LogManager::IsWeaponLogEnable(), m_animState, m_weapon и HumanCommandWeapons::StaticSetInitState().
Используется в HandStateBase::OnEntry(), OnEntry(), HandStateBase::OnUpdate() и OnUpdate().
void ValidateMuzzleArray | ( | ) |
Safety check and error message in case not set up correctly.
Перекрестные ссылки ErrorEx, IsSingleState() и m_muzzleHasBullet.
Используется в WeaponStableState().
void WeaponStableState | ( | Weapon_Base | w = NULL, |
WeaponStateBase | parent = NULL, | ||
int | anim_state = -1 ) |
Перекрестные ссылки WeaponStableState::InitMuzzleArray(), m_animState и ValidateMuzzleArray().
Используется в Weapon_Base::InitStateMachine().
enum MuzzleState m_animState |
Используется в SyncAnimState() и WeaponStableState().
ref array<MuzzleState> m_muzzleHasBullet = new array<MuzzleState>() |