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

Private Member Functions

override void OnEntry (WeaponEventBase e)
 
override void OnUpdate (float dt)
 
override void OnExit (WeaponEventBase e)
 

Detailed Description

Definition at line 196 of file WeaponFire.c.

Member Function Documentation

◆ OnEntry()

override void WeaponFireMultiMuzzle::OnEntry ( WeaponEventBase e)
inlineprivate

Definition at line 198 of file WeaponFire.c.

199 {
200 super.OnEntry(e);
201 if (e)
202 {
204 Magnum_Ejector ejector = Magnum_Ejector.Cast(m_weapon.GetAttachmentByType(Magnum_Ejector));
205 if (cylinder && ejector)
206 {
207 float a;
208 int mi = m_weapon.GetCurrentMuzzle();
209 switch (mi)
210 {
211 case 0:
213 break;
214 case 1:
216 cylinder.ResetAnimationPhase("Rotate_Cylinder", MAGNUM_ROTATION_POSITION_6);
217 ejector.ResetAnimationPhase("Rotate_Ejector", MAGNUM_ROTATION_POSITION_6);
218 break;
219 case 2:
221 break;
222 case 3:
224 break;
225 case 4:
227 break;
228 case 5:
230 break;
231 }
232 cylinder.SetAnimationPhase("Rotate_Cylinder", a);
233 ejector.SetAnimationPhase("Rotate_Ejector", a);
234 }
235 }
236 }
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
const float MAGNUM_ROTATION_POSITION_2
Definition Magnum.c:4
const float MAGNUM_ROTATION_POSITION_1
Definition Magnum.c:3
const float MAGNUM_ROTATION_POSITION_3
Definition Magnum.c:5
const float MAGNUM_ROTATION_POSITION_4
Definition Magnum.c:6
const float MAGNUM_ROTATION_POSITION_6
Definition Magnum.c:8
const float MAGNUM_ROTATION_POSITION_5
Definition Magnum.c:7
const float MAGNUM_ROTATION_POSITION_0
Definition Magnum.c:2

References m_weapon, MAGNUM_ROTATION_POSITION_0, MAGNUM_ROTATION_POSITION_1, MAGNUM_ROTATION_POSITION_2, MAGNUM_ROTATION_POSITION_3, MAGNUM_ROTATION_POSITION_4, MAGNUM_ROTATION_POSITION_5, and MAGNUM_ROTATION_POSITION_6.

◆ OnExit()

override void WeaponFireMultiMuzzle::OnExit ( WeaponEventBase e)
inlineprivate

Definition at line 252 of file WeaponFire.c.

253 {
254 if (e)
255 m_dtAccumulator = 0;
256 super.OnExit(e);
257 }
class WeaponFireWithEject extends WeaponFire m_dtAccumulator

References m_dtAccumulator.

◆ OnUpdate()

override void WeaponFireMultiMuzzle::OnUpdate ( float dt)
inlineprivate

Definition at line 238 of file WeaponFire.c.

239 {
241
243 Class.CastTo(p, m_weapon.GetHierarchyParent());
244
245 int muzzleIndex = m_weapon.GetCurrentMuzzle();
246 float reloadTime = m_weapon.GetReloadTime(muzzleIndex);
248 if (m_weapon.CanProcessWeaponEvents())
249 m_weapon.ProcessWeaponEvent(new WeaponEventReloadTimeout(p));
250 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), m_dtAccumulator, and m_weapon.


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