Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Headers and defines for Autobuy and Rebuy
  4. //
  5. //=============================================================================//
  6. /**
  7. * Weapon classes as used by the AutoBuy
  8. * Has to be different that the previous ones because these are bitmasked values as a weapon can be from
  9. * more than one class. This also includes all the classes of equipment that a player can buy.
  10. */
  11. enum AutoBuyClassType
  12. {
  13. AUTOBUYCLASS_PRIMARY = 1,
  14. AUTOBUYCLASS_SECONDARY = 2,
  15. AUTOBUYCLASS_AMMO = 4,
  16. AUTOBUYCLASS_ARMOR = 8,
  17. AUTOBUYCLASS_DEFUSER = 16,
  18. AUTOBUYCLASS_PISTOL = 32,
  19. AUTOBUYCLASS_SMG = 64,
  20. AUTOBUYCLASS_RIFLE = 128,
  21. AUTOBUYCLASS_SNIPERRIFLE = 256,
  22. AUTOBUYCLASS_SHOTGUN = 512,
  23. AUTOBUYCLASS_MACHINEGUN = 1024,
  24. AUTOBUYCLASS_GRENADE = 2048,
  25. AUTOBUYCLASS_NIGHTVISION = 4096,
  26. AUTOBUYCLASS_SHIELD = 8192,
  27. };
  28. struct AutoBuyInfoStruct
  29. {
  30. AutoBuyClassType m_class;
  31. const char *m_command;
  32. const char *m_classname;
  33. };
  34. struct RebuyStruct
  35. {
  36. char m_szPrimaryWeapon[64]; //"weapon_" string of the primary weapon
  37. char m_szSecondaryWeapon[64]; //"weapon_" string of the secondary weapon
  38. int m_primaryAmmo; // number of rounds the player had (not including rounds in the gun)
  39. int m_secondaryAmmo; // number of rounds the player had (not including rounds in the gun)
  40. int m_heGrenade; // number of grenades to buy
  41. int m_flashbang; // number of grenades to buy
  42. int m_smokeGrenade; // number of grenades to buy
  43. int m_armor; // 0, 1, or 2 (0 = none, 1 = vest, 2 = vest + helmet)
  44. bool m_defuser; // do we want a defuser
  45. bool m_nightVision; // do we want night vision
  46. };
  47. extern AutoBuyInfoStruct g_autoBuyInfo[];