DayZ 1.24
Loading...
Searching...
No Matches
Guards.c File Reference

Go to the source code of this file.

Classes

class  WeaponGuardBase
 represents guard on a transition from state to state More...
 

Functions

void WeaponGuardHasAmmo (Weapon_Base w=NULL)
 
override bool GuardCondition (WeaponEventBase e)
 
void WeaponGuardWeaponDischarged (Weapon_Base w=NULL)
 
void WeaponGuardWeaponOpen (Weapon_Base w=NULL)
 

Variables

class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
 

Function Documentation

◆ GuardCondition()

override bool GuardCondition ( WeaponEventBase e)

Definition at line 101 of file Guards.c.

102 {
103 int mi = m_weapon.GetCurrentMuzzle();
104 Magazine mag = m_weapon.GetMagazine(mi);
105 if (mag != NULL && mag.GetAmmoCount() > 0)
106 {
107 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " guard - has ammo");
108 return true;
109 }
110 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " guard - no ammo");
111 return false;
112 }
void wpnDebugPrint(string s)
Definition Debug.c:9
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
static bool IsWeaponLogEnable()
Definition Debug.c:799

References LogManager::IsWeaponLogEnable(), m_weapon, and wpnDebugPrint().

◆ WeaponGuardHasAmmo()

◆ WeaponGuardWeaponDischarged()

void WeaponGuardWeaponDischarged ( Weapon_Base w = NULL)

Definition at line 578 of file Guards.c.

578{ m_weapon = w; }

References m_weapon.

Referenced by Crossbow_Base::InitStateMachine(), and Weapon_Base::InitStateMachine().

◆ WeaponGuardWeaponOpen()

void GuardCondition::WeaponGuardWeaponOpen ( Weapon_Base w = NULL)
protected

Definition at line 604 of file Guards.c.

Referenced by Rifle_Base::InitStateMachine(), and Weapon_Base::InitStateMachine().

Variable Documentation

◆ m_weapon

Weapon_Base m_weapon

Definition at line 602 of file Guards.c.

Referenced by WeaponActionBase::Action(), ChamberMultiBullet(), WeaponStateBase::FindNextFreeMuzzle(), WeaponGuardBase::GuardCondition(), GuardCondition(), HasBullet(), IsJammed(), WeaponStateBase::LoadCurrentFSMState(), LoadCurrentFSMState(), WeaponStateBase::LoopedChambering(), WeaponStateBase::LoopedChamberingEjectLast(), WeaponStateBase::OnAbort(), WeaponEjectAllMuzzles::OnAbort(), WeaponChambering_Base::OnAbort(), OnAbort(), WeaponStartAction::OnAbort(), WeaponStableState::OnEntry(), WeaponStateJammed::OnEntry(), WeaponStateBase::OnEntry(), RemoveNewMagazineFromInventory::OnEntry(), WeaponStartAction::OnEntry(), WeaponChambering_Base::OnEntry(), WeaponChambering_Cartridge::OnEntry(), WeaponEjectCasing::OnEntry(), WeaponFire::OnEntry(), OnEntry(), WeaponFireMultiMuzzle::OnEntry(), OnExit(), WeaponStableState::OnExit(), WeaponStateJammed::OnExit(), WeaponStateBase::OnExit(), WeaponEjectAllMuzzles::OnExit(), WeaponChambering_Base::OnExit(), WeaponChambering_Cartridge::OnExit(), WeaponStartAction::OnUpdate(), OnUpdate(), WeaponFireMultiMuzzle::OnUpdate(), WeaponStateBase::OnUpdate(), WeaponStateBase::RifleChambering(), WeaponStateBase::RifleEjectCasing(), WeaponStateBase::RifleReChambering(), WeaponStateBase::SaveCurrentFSMState(), SaveCurrentFSMState(), SyncAnimState(), WeaponActionBase::WeaponActionDryDryFire(), WeaponActionBase::WeaponActionDryFire(), WeaponStateBase::WeaponAttachMagazine(), WeaponStateBase::WeaponChambering(), WeaponStateBase::WeaponCharging(), WeaponStateBase::WeaponChargingInnerMag(), WeaponStateBase::WeaponChargingMultiple(), WeaponStateBase::WeaponChargingStretch(), WeaponStateBase::WeaponDetachingMag(), WeaponStateBase::WeaponEjectBullet(), WeaponStateBase::WeaponFireAndChamberNext(), WeaponStateBase::WeaponFireAndChamberNextFromInnerMag(), WeaponStateBase::WeaponFireLast(), WeaponGuardBase::WeaponGuardAnyChamberEmpty(), WeaponGuardBase::WeaponGuardAnyChamberFiredOut(), WeaponGuardBase::WeaponGuardCanAttachMag(), WeaponGuardBase::WeaponGuardCanDetachMag(), WeaponGuardBase::WeaponGuardCanSwapMag(), WeaponGuardBase::WeaponGuardChamberEmpty(), WeaponGuardBase::WeaponGuardChamberFiredOut(), WeaponGuardBase::WeaponGuardChamberFull(), WeaponGuardBase::WeaponGuardChamberHasRoomForMoreThanOne(), WeaponGuardBase::WeaponGuardChamberHasRoomForOne(), WeaponGuardBase::WeaponGuardChamberMultiHasRoomBulltet(), WeaponGuardBase::WeaponGuardChamberMultiHasRoomBulltetIgnoreLast(), WeaponGuardBase::WeaponGuardCurrentChamberEmpty(), WeaponGuardBase::WeaponGuardCurrentChamberFiredOut(), WeaponGuardBase::WeaponGuardCurrentChamberFull(), WeaponGuardHasAmmo(), WeaponGuardBase::WeaponGuardHasAmmoInEvent(), WeaponGuardBase::WeaponGuardHasAmmoInnerMagazine(), WeaponGuardBase::WeaponGuardHasMag(), WeaponGuardBase::WeaponGuardInnerMagazineFull(), WeaponGuardBase::WeaponGuardInnerMagazineFullShareChamber(), WeaponGuardBase::WeaponGuardInternalMagazineHasRoomForBullet(), WeaponGuardBase::WeaponGuardIsDestroyed(), WeaponGuardBase::WeaponGuardJammed(), WeaponGuardBase::WeaponGuardMagazinesHaveEqualSizes(), WeaponGuardBase::WeaponGuardWeaponCharged(), WeaponGuardWeaponDischarged(), WeaponGuardBase::WeaponGuardWeaponOpen(), WeaponStateBase::WeaponMagnumChambering(), WeaponStateBase::WeaponRechamber(), WeaponStateBase::WeaponReplacingMagAndChamberNext(), and WeaponStateBase::WeaponUnjamming().