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.

70 lines
2.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_dodbasemelee.h"
  8. #if defined( CLIENT_DLL )
  9. #define CWeaponSpade C_WeaponSpade
  10. #endif
  11. class CWeaponSpade : public CWeaponDODBaseMelee
  12. {
  13. public:
  14. DECLARE_CLASS( CWeaponSpade, CWeaponDODBaseMelee );
  15. DECLARE_NETWORKCLASS();
  16. DECLARE_PREDICTABLE();
  17. DECLARE_ACTTABLE();
  18. CWeaponSpade() {}
  19. virtual Activity GetMeleeActivity( void ) { return ACT_VM_PRIMARYATTACK; }
  20. virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_SPADE; }
  21. private:
  22. CWeaponSpade( const CWeaponSpade & );
  23. };
  24. IMPLEMENT_NETWORKCLASS_ALIASED( WeaponSpade, DT_WeaponSpade )
  25. BEGIN_NETWORK_TABLE( CWeaponSpade, DT_WeaponSpade )
  26. END_NETWORK_TABLE()
  27. BEGIN_PREDICTION_DATA( CWeaponSpade )
  28. END_PREDICTION_DATA()
  29. LINK_ENTITY_TO_CLASS( weapon_spade, CWeaponSpade );
  30. PRECACHE_WEAPON_REGISTER( weapon_spade );
  31. acttable_t CWeaponSpade::m_acttable[] =
  32. {
  33. { ACT_DOD_STAND_AIM, ACT_DOD_STAND_AIM_SPADE, false },
  34. { ACT_DOD_CROUCH_AIM, ACT_DOD_CROUCH_AIM_SPADE, false },
  35. { ACT_DOD_CROUCHWALK_AIM, ACT_DOD_CROUCHWALK_AIM_SPADE, false },
  36. { ACT_DOD_WALK_AIM, ACT_DOD_WALK_AIM_SPADE, false },
  37. { ACT_DOD_RUN_AIM, ACT_DOD_RUN_AIM_SPADE, false },
  38. { ACT_PRONE_IDLE, ACT_DOD_PRONE_AIM_SPADE, false },
  39. { ACT_PRONE_FORWARD, ACT_DOD_PRONEWALK_AIM_SPADE, false },
  40. { ACT_DOD_STAND_IDLE, ACT_DOD_STAND_AIM_SPADE, false },
  41. { ACT_DOD_CROUCH_IDLE, ACT_DOD_CROUCH_AIM_SPADE, false },
  42. { ACT_DOD_CROUCHWALK_IDLE, ACT_DOD_CROUCHWALK_AIM_SPADE, false },
  43. { ACT_DOD_WALK_IDLE, ACT_DOD_WALK_AIM_SPADE, false },
  44. { ACT_DOD_RUN_IDLE, ACT_DOD_RUN_AIM_SPADE, false },
  45. { ACT_SPRINT, ACT_DOD_SPRINT_AIM_SPADE, false },
  46. { ACT_RANGE_ATTACK2, ACT_DOD_PRIMARYATTACK_SPADE, false },
  47. { ACT_DOD_SECONDARYATTACK_CROUCH, ACT_DOD_PRIMARYATTACK_CROUCH_SPADE, false },
  48. { ACT_DOD_SECONDARYATTACK_PRONE, ACT_DOD_PRIMARYATTACK_PRONE_SPADE, false },
  49. // Hand Signals
  50. { ACT_DOD_HS_IDLE, ACT_DOD_HS_IDLE_STICKGRENADE, false },
  51. { ACT_DOD_HS_CROUCH, ACT_DOD_HS_CROUCH_STICKGRENADE, false },
  52. };
  53. IMPLEMENT_ACTTABLE( CWeaponSpade );