weaponchamberfromattmag.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // load bullet from att mag (no anim)
  2. class WeaponChamberFromAttMag extends WeaponStateBase
  3. {
  4. void WeaponChamberFromAttMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  5. { }
  6. override void OnEntry (WeaponEventBase e)
  7. {
  8. super.OnEntry(e);
  9. if(e)
  10. {
  11. int mi = m_weapon.GetCurrentMuzzle();
  12. m_weapon.SetCharged(true);
  13. m_weapon.SetWeaponOpen(false);
  14. pushToChamberFromAttachedMagazine(m_weapon, mi);
  15. }
  16. }
  17. override void OnExit (WeaponEventBase e)
  18. {
  19. super.OnExit(e);
  20. }
  21. };
  22. // load bullet from att mag (no anim)
  23. class WeaponChamberFromInnerMag extends WeaponStateBase
  24. {
  25. void WeaponChamberFromInnerMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  26. { }
  27. override void OnEntry (WeaponEventBase e)
  28. {
  29. super.OnEntry(e);
  30. if (e)
  31. {
  32. int mi = m_weapon.GetCurrentMuzzle();
  33. pushToChamberFromInnerMagazine(m_weapon, mi);
  34. }
  35. }
  36. override void OnExit (WeaponEventBase e)
  37. {
  38. super.OnExit(e);
  39. }
  40. };
  41. // load bullet from att mag (no anim)
  42. class WeaponChamberFromAttMagOnExit extends WeaponStateBase
  43. {
  44. void WeaponChamberFromAttMagOnExit (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  45. { }
  46. override void OnExit (WeaponEventBase e)
  47. {
  48. int mi = m_weapon.GetCurrentMuzzle();
  49. pushToChamberFromAttachedMagazine(m_weapon, mi);
  50. super.OnExit(e);
  51. }
  52. };
  53. // load bullet from att mag (no anim)
  54. class WeaponEjectAndChamberFromAttMag extends WeaponEjectAllMuzzles
  55. {
  56. void WeaponEjectAndChamberFromAttMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  57. { }
  58. override void OnExit (WeaponEventBase e)
  59. {
  60. if (e)
  61. {
  62. int mi = m_weapon.GetCurrentMuzzle();
  63. pushToChamberFromAttachedMagazine(m_weapon, mi);
  64. }
  65. super.OnExit(e);
  66. }
  67. override void OnAbort (WeaponEventBase e)
  68. {
  69. if (e)
  70. {
  71. int mi = m_weapon.GetCurrentMuzzle();
  72. pushToChamberFromAttachedMagazine(m_weapon, mi);
  73. }
  74. super.OnAbort(e);
  75. }
  76. };