DayZ 1.24
Loading...
Searching...
No Matches
WeaponFire Class Reference

Private Member Functions

override void OnEntry (WeaponEventBase e)
 
override void OnEntry (WeaponEventBase e)
 
override void OnEntry (WeaponEventBase e)
 

Detailed Description

Definition at line 96 of file WeaponFire.c.

Member Function Documentation

◆ OnEntry() [1/3]

override void WeaponFire::OnEntry ( WeaponEventBase e)
inlineprivate

Definition at line 98 of file WeaponFire.c.

99 {
100 m_dtAccumulator = 0;
101
102 if (LogManager.IsWeaponLogEnable()) wpnPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponFire bang!");
103 //m_weapon.Fire();
104 int mi = m_weapon.GetCurrentMuzzle();
106 {
108 if (Class.CastTo(p, e.m_player))
109 p.GetAimingModel().SetRecoil(m_weapon);
110 m_weapon.EjectCasing(mi);
111 m_weapon.EffectBulletHide(mi);
112 m_weapon.OnFire(mi);
113 }
114 super.OnEntry(e);
115 }
void wpnPrint(string s)
Definition Debug.c:1
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
class WeaponFireWithEject extends WeaponFire m_dtAccumulator
proto native bool TryFireWeapon(EntityAI weapon, int muzzleIndex)
Super root of all classes in Enforce script.
Definition EnScript.c:11
static bool IsWeaponLogEnable()
Definition Debug.c:799
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), LogManager::IsWeaponLogEnable(), m_dtAccumulator, m_weapon, TryFireWeapon(), and wpnPrint().

◆ OnEntry() [2/3]

override void WeaponFire::OnEntry ( WeaponEventBase e)
inlineprivate

Definition at line 314 of file WeaponFire.c.

315 {
316 super.OnEntry(e);
317 if (e)
318 {
319 if (!m_weapon.IsJammed())
320 {
321 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " ejected fired out casing");
322 int mi = m_weapon.GetCurrentMuzzle();
323 m_weapon.EjectCasing(mi);
324 m_weapon.EffectBulletHide(mi);
325 m_weapon.SelectionBulletHide();
326
328 }
329 }
330 }
void wpnDebugPrint(string s)
Definition Debug.c:9
bool pushToChamberFromAttachedMagazine(Weapon_Base weapon, int muzzleIndex)
Definition weapon_utils.c:1

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

◆ OnEntry() [3/3]

override void WeaponFire::OnEntry ( WeaponEventBase e)
inlineprivate

Definition at line 335 of file WeaponFire.c.

336 {
337 super.OnEntry(e);
338
339 if (!m_weapon.IsJammed())
340 {
341 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " ejected fired out casing");
342 int mi = m_weapon.GetCurrentMuzzle();
343 m_weapon.EjectCasing(mi);
344 m_weapon.EffectBulletHide(mi);
345 m_weapon.SelectionBulletHide();
346
348 }
349 }
bool pushToChamberFromInnerMagazine(Weapon_Base weapon, int muzzleIndex)

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


The documentation for this class was generated from the following file: