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

Private Member Functions

override void OnExit (WeaponEventBase e)
 
override bool IsWaitingForActionFinish ()
 
override void OnEntry (WeaponEventBase e)
 
override void OnExit (WeaponEventBase e)
 

Detailed Description

Definition at line 161 of file WeaponChambering.c.

Member Function Documentation

◆ IsWaitingForActionFinish()

override bool WeaponChambering_Cartridge::IsWaitingForActionFinish ( )
inlineprivate

Definition at line 243 of file WeaponChambering.c.

243{ return true; }

◆ OnEntry()

override void WeaponChambering_Cartridge::OnEntry ( WeaponEventBase e)
inlineprivate

Definition at line 244 of file WeaponChambering.c.

245 {
246 super.OnEntry(e);
247
248 for (int i = 0; i < m_weapon.GetMuzzleCount(); i++)
249 {
250 if (!m_weapon.IsChamberFull(i))
251 {
252 m_weapon.ShowBullet(i);
253 m_weapon.EffectBulletShow(i, m_damage, m_type);
254 return;
255 }
256 }
257 }
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602

References m_weapon.

◆ OnExit() [1/2]

override void WeaponChambering_Cartridge::OnExit ( WeaponEventBase e)
inlineprivate

Definition at line 163 of file WeaponChambering.c.

164 {
165 float ammoDamage;
166 string ammoTypeName;
167 int mi = m_weapon.GetCurrentMuzzle();
168 if (m_weapon.IsChamberFull(mi))
169 {
170 m_weapon.PopCartridgeFromChamber(mi, ammoDamage, ammoTypeName);
171 if (m_weapon.PushCartridgeToInternalMagazine(mi, ammoDamage, ammoTypeName))
172 {
173 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, ok - loaded chamber");
174 }
175 else if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - cannot load chamber chamber!");
176 }
177
178 m_weapon.SetWeaponOpen(false);
179 super.OnExit(e);
180 }
void wpnDebugPrint(string s)
Definition Debug.c:9
static bool IsWeaponLogEnable()
Definition Debug.c:799

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

◆ OnExit() [2/2]

override void WeaponChambering_Cartridge::OnExit ( WeaponEventBase e)
inlineprivate

Definition at line 259 of file WeaponChambering.c.

260 {
261 for (int i = 0; i < m_weapon.GetMuzzleCount(); i++)
262 {
263 if (!m_weapon.IsChamberFull(i))
264 {
265 if (m_weapon.PushCartridgeToChamber(i, m_damage, m_type))
266 {
267 if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, ok - loaded chamber");
268 }
269 else if (LogManager.IsWeaponLogEnable()) wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - cannot load chamber chamber!");
270 m_type = string.Empty;
271 return;
272 }
273 }
274
275 super.OnExit(e);
276 }

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


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