weaponchamberfromattmag.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. class WeaponChamberFromAttMagOpenbolt extends WeaponStateBase
  23. {
  24. void WeaponChamberFromAttMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  25. { }
  26. override void OnEntry (WeaponEventBase e)
  27. {
  28. super.OnEntry(e);
  29. if(e)
  30. {
  31. int mi = m_weapon.GetCurrentMuzzle();
  32. m_weapon.SetCharged(true);
  33. m_weapon.SetWeaponOpen(true);
  34. pushToChamberFromAttachedMagazine(m_weapon, mi);
  35. }
  36. }
  37. override void OnExit (WeaponEventBase e)
  38. {
  39. super.OnExit(e);
  40. }
  41. };
  42. class WeaponChamberFromAttMagOpenbolt_W4T extends WeaponChamberFromAttMagOpenbolt
  43. {
  44. override bool IsWaitingForActionFinish()
  45. {
  46. return true;
  47. }
  48. }
  49. // load bullet from att mag (no anim)
  50. class WeaponChamberFromInnerMag extends WeaponStateBase
  51. {
  52. void WeaponChamberFromInnerMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  53. { }
  54. override void OnEntry (WeaponEventBase e)
  55. {
  56. super.OnEntry(e);
  57. if (e)
  58. {
  59. int mi = m_weapon.GetCurrentMuzzle();
  60. pushToChamberFromInnerMagazine(m_weapon, mi);
  61. }
  62. }
  63. override void OnExit (WeaponEventBase e)
  64. {
  65. super.OnExit(e);
  66. }
  67. };
  68. // load bullet from att mag (no anim)
  69. class WeaponChamberFromAttMagOnExit extends WeaponStateBase
  70. {
  71. void WeaponChamberFromAttMagOnExit (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  72. { }
  73. override void OnExit (WeaponEventBase e)
  74. {
  75. int mi = m_weapon.GetCurrentMuzzle();
  76. pushToChamberFromAttachedMagazine(m_weapon, mi);
  77. super.OnExit(e);
  78. }
  79. };
  80. // load bullet from att mag (no anim)
  81. class WeaponEjectAndChamberFromAttMag extends WeaponEjectAllMuzzles
  82. {
  83. void WeaponEjectAndChamberFromAttMag (Weapon_Base w = NULL, WeaponStateBase parent = NULL, int action = -1, int actionType = -1)
  84. { }
  85. override void OnExit (WeaponEventBase e)
  86. {
  87. if (e)
  88. {
  89. int mi = m_weapon.GetCurrentMuzzle();
  90. pushToChamberFromAttachedMagazine(m_weapon, mi);
  91. }
  92. super.OnExit(e);
  93. }
  94. override void OnAbort (WeaponEventBase e)
  95. {
  96. if (e)
  97. {
  98. int mi = m_weapon.GetCurrentMuzzle();
  99. pushToChamberFromAttachedMagazine(m_weapon, mi);
  100. }
  101. super.OnAbort(e);
  102. }
  103. };