mp5.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**@class MP5K_Base
  2. * @brief basic mp5 submachine gun
  3. **/
  4. class MP5K_Base : RifleBoltFree_Base
  5. {
  6. void MP5K_Base ()
  7. {
  8. }
  9. override RecoilBase SpawnRecoilObject()
  10. {
  11. return new Mp5kRecoil(this);
  12. }
  13. override int GetWeaponSpecificCommand(int weaponAction ,int subCommand)
  14. {
  15. if ( weaponAction == WeaponActions.RELOAD)
  16. {
  17. switch (subCommand)
  18. {
  19. case WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_BULLET:
  20. return WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_BULLET;
  21. case WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_BULLET:
  22. return WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET;
  23. case WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_NOBULLET:
  24. return WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_NOBULLET;
  25. case WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_NOBULLET:
  26. return WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET;
  27. default:
  28. return subCommand;
  29. }
  30. }
  31. return subCommand;
  32. }
  33. //Debug menu Spawn Ground Special
  34. override void OnDebugSpawn()
  35. {
  36. GameInventory inventory = GetInventory();
  37. inventory.CreateInInventory( "MP5k_StockBttstck" );
  38. inventory.CreateInInventory( "MP5_RailHndgrd" );
  39. inventory.CreateInInventory( "MP5_Compensator" );
  40. inventory.CreateInInventory( "ReflexOptic" );
  41. inventory.CreateInInventory( "UniversalLight" );
  42. inventory.CreateInInventory( "Battery9V" );
  43. inventory.CreateInInventory( "Battery9V" );
  44. SpawnAttachedMagazine("Mag_MP5_30Rnd");
  45. }
  46. };