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.

81 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_dodfullauto_punch.h"
  8. #if defined( CLIENT_DLL )
  9. #define CWeaponThompson C_WeaponThompson
  10. #endif
  11. class CWeaponThompson : public CDODFullAutoPunchWeapon
  12. {
  13. public:
  14. DECLARE_CLASS( CWeaponThompson, CDODFullAutoPunchWeapon );
  15. DECLARE_NETWORKCLASS();
  16. DECLARE_PREDICTABLE();
  17. DECLARE_ACTTABLE();
  18. CWeaponThompson() {}
  19. virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_THOMPSON; }
  20. virtual DODWeaponID GetAltWeaponID( void ) const { return WEAPON_THOMPSON_PUNCH; }
  21. virtual float GetRecoil( void ) { return 2.15f; }
  22. private:
  23. CWeaponThompson( const CWeaponThompson & );
  24. };
  25. IMPLEMENT_NETWORKCLASS_ALIASED( WeaponThompson, DT_WeaponThompson )
  26. BEGIN_NETWORK_TABLE( CWeaponThompson, DT_WeaponThompson )
  27. END_NETWORK_TABLE()
  28. BEGIN_PREDICTION_DATA( CWeaponThompson )
  29. END_PREDICTION_DATA()
  30. LINK_ENTITY_TO_CLASS( weapon_thompson, CWeaponThompson );
  31. PRECACHE_WEAPON_REGISTER( weapon_thompson );
  32. acttable_t CWeaponThompson::m_acttable[] =
  33. {
  34. { ACT_DOD_STAND_AIM, ACT_DOD_STAND_AIM_TOMMY, false },
  35. { ACT_DOD_CROUCH_AIM, ACT_DOD_CROUCH_AIM_TOMMY, false },
  36. { ACT_DOD_CROUCHWALK_AIM, ACT_DOD_CROUCHWALK_AIM_TOMMY, false },
  37. { ACT_DOD_WALK_AIM, ACT_DOD_WALK_AIM_TOMMY, false },
  38. { ACT_DOD_RUN_AIM, ACT_DOD_RUN_AIM_TOMMY, false },
  39. { ACT_PRONE_IDLE, ACT_DOD_PRONE_AIM_TOMMY, false },
  40. { ACT_PRONE_FORWARD, ACT_DOD_PRONEWALK_IDLE_TOMMY, false },
  41. { ACT_DOD_STAND_IDLE, ACT_DOD_STAND_IDLE_TOMMY, false },
  42. { ACT_DOD_CROUCH_IDLE, ACT_DOD_CROUCH_IDLE_TOMMY, false },
  43. { ACT_DOD_CROUCHWALK_IDLE, ACT_DOD_CROUCHWALK_IDLE_TOMMY, false },
  44. { ACT_DOD_WALK_IDLE, ACT_DOD_WALK_IDLE_TOMMY, false },
  45. { ACT_DOD_RUN_IDLE, ACT_DOD_RUN_IDLE_TOMMY, false },
  46. { ACT_SPRINT, ACT_DOD_SPRINT_IDLE_TOMMY, false },
  47. { ACT_RANGE_ATTACK1, ACT_DOD_PRIMARYATTACK_TOMMY, false },
  48. { ACT_DOD_PRIMARYATTACK_CROUCH, ACT_DOD_PRIMARYATTACK_TOMMY, false },
  49. { ACT_DOD_PRIMARYATTACK_PRONE, ACT_DOD_PRIMARYATTACK_PRONE_TOMMY, false },
  50. { ACT_RANGE_ATTACK2, ACT_DOD_SECONDARYATTACK_TOMMY, false },
  51. { ACT_DOD_SECONDARYATTACK_CROUCH, ACT_DOD_SECONDARYATTACK_CROUCH_TOMMY, false },
  52. { ACT_DOD_SECONDARYATTACK_PRONE, ACT_DOD_SECONDARYATTACK_PRONE_TOMMY, false },
  53. { ACT_RELOAD, ACT_DOD_RELOAD_TOMMY, false },
  54. { ACT_DOD_RELOAD_CROUCH, ACT_DOD_RELOAD_CROUCH_TOMMY, false },
  55. { ACT_DOD_RELOAD_PRONE, ACT_DOD_RELOAD_PRONE_TOMMY, false },
  56. // Hand Signals
  57. { ACT_DOD_HS_IDLE, ACT_DOD_HS_IDLE_TOMMY, false },
  58. { ACT_DOD_HS_CROUCH, ACT_DOD_HS_CROUCH_TOMMY, false },
  59. };
  60. IMPLEMENT_ACTTABLE( CWeaponThompson );