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.

103 lines
2.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef DOD_WEAPON_PARSE_H
  7. #define DOD_WEAPON_PARSE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "weapon_parse.h"
  12. #include "networkvar.h"
  13. #define WPN_TYPE_MELEE (1<<0)
  14. #define WPN_TYPE_GRENADE (1<<1)
  15. //#define WPN_TYPE_GRENADE_LIVE (1<<2) //exploding grenades, unused
  16. #define WPN_TYPE_PISTOL (1<<3)
  17. #define WPN_TYPE_RIFLE (1<<4)
  18. #define WPN_TYPE_SNIPER (1<<5)
  19. #define WPN_TYPE_SUBMG (1<<6)
  20. #define WPN_TYPE_MG (1<<7) //mg42, 30cal
  21. #define WPN_TYPE_BAZOOKA (1<<8)
  22. #define WPN_TYPE_BANDAGE (1<<9)
  23. #define WPN_TYPE_SIDEARM (1<<10) //carbine - secondary weapons
  24. #define WPN_TYPE_RIFLEGRENADE (1<<11)
  25. #define WPN_TYPE_BOMB (1<<12)
  26. #define WPN_TYPE_UNKNOWN (1<<13)
  27. #define WPN_TYPE_CAMERA (1<<12)
  28. #define WPN_MASK_GUN ( WPN_TYPE_PISTOL | WPN_TYPE_RIFLE | WPN_TYPE_SNIPER | WPN_TYPE_SUBMG | WPN_TYPE_MG | WPN_TYPE_SIDEARM )
  29. //--------------------------------------------------------------------------------------------------------
  30. class CDODWeaponInfo : public FileWeaponInfo_t
  31. {
  32. public:
  33. DECLARE_CLASS_GAMEROOT( CDODWeaponInfo, FileWeaponInfo_t );
  34. CDODWeaponInfo();
  35. virtual void Parse( ::KeyValues *pKeyValuesData, const char *szWeaponName );
  36. int m_iDamage;
  37. int m_flPenetration;
  38. int m_iBulletsPerShot;
  39. int m_iMuzzleFlashType;
  40. float m_flMuzzleFlashScale;
  41. bool m_bCanDrop;
  42. float m_flRecoil;
  43. float m_flRange;
  44. float m_flRangeModifier;
  45. float m_flAccuracy;
  46. float m_flSecondaryAccuracy;
  47. float m_flAccuracyMovePenalty;
  48. float m_flFireDelay;
  49. float m_flSecondaryFireDelay;
  50. int m_iCrosshairMinDistance;
  51. int m_iCrosshairDeltaDistance;
  52. int m_WeaponType;
  53. float m_flBotAudibleRange;
  54. char m_szReloadModel[MAX_WEAPON_STRING];
  55. char m_szDeployedModel[MAX_WEAPON_STRING];
  56. char m_szDeployedReloadModel[MAX_WEAPON_STRING];
  57. char m_szProneDeployedReloadModel[MAX_WEAPON_STRING];
  58. //timers
  59. float m_flTimeToIdleAfterFire; //wait this long until idling after fire
  60. float m_flIdleInterval; //wait this long after idling to idle again
  61. //ammo
  62. int m_iDefaultAmmoClips;
  63. int m_iAmmoPickupClips;
  64. int m_iHudClipHeight;
  65. int m_iHudClipBaseHeight;
  66. int m_iHudClipBulletHeight;
  67. int m_iTracerType;
  68. float m_flViewModelFOV;
  69. int m_iAltWpnCriteria;
  70. Vector m_vecViewNormalOffset;
  71. Vector m_vecViewProneOffset;
  72. Vector m_vecIronSightOffset;
  73. int m_iDefaultTeam;
  74. };
  75. #endif // DOD_WEAPON_PARSE_H