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.

86 lines
2.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_dodfireselect.h"
  8. #if defined( CLIENT_DLL )
  9. #define CWeaponMP44 C_WeaponMP44
  10. #endif
  11. class CWeaponMP44 : public CDODFireSelectWeapon
  12. {
  13. public:
  14. DECLARE_CLASS( CWeaponMP44, CDODFireSelectWeapon );
  15. DECLARE_NETWORKCLASS();
  16. DECLARE_PREDICTABLE();
  17. DECLARE_ACTTABLE();
  18. CWeaponMP44() {}
  19. virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_MP44; }
  20. // weapon id for stats purposes
  21. virtual DODWeaponID GetStatsWeaponID( void )
  22. {
  23. if ( IsSemiAuto() )
  24. return WEAPON_MP44_SEMIAUTO;
  25. else
  26. return WEAPON_MP44;
  27. }
  28. virtual float GetRecoil( void ) { return 5.0f; }
  29. private:
  30. CWeaponMP44( const CWeaponMP44 & );
  31. };
  32. IMPLEMENT_NETWORKCLASS_ALIASED( WeaponMP44, DT_WeaponMP44 )
  33. BEGIN_NETWORK_TABLE( CWeaponMP44, DT_WeaponMP44 )
  34. END_NETWORK_TABLE()
  35. BEGIN_PREDICTION_DATA( CWeaponMP44 )
  36. END_PREDICTION_DATA()
  37. LINK_ENTITY_TO_CLASS( weapon_mp44, CWeaponMP44 );
  38. PRECACHE_WEAPON_REGISTER( weapon_mp44 );
  39. acttable_t CWeaponMP44::m_acttable[] =
  40. {
  41. { ACT_DOD_STAND_AIM, ACT_DOD_STAND_AIM_MP44, false },
  42. { ACT_DOD_CROUCH_AIM, ACT_DOD_CROUCH_AIM_MP44, false },
  43. { ACT_DOD_CROUCHWALK_AIM, ACT_DOD_CROUCHWALK_AIM_MP44, false },
  44. { ACT_DOD_WALK_AIM, ACT_DOD_WALK_AIM_MP44, false },
  45. { ACT_DOD_RUN_AIM, ACT_DOD_RUN_AIM_MP44, false },
  46. { ACT_PRONE_IDLE, ACT_DOD_PRONE_AIM_MP44, false },
  47. { ACT_PRONE_FORWARD, ACT_DOD_PRONEWALK_IDLE_MP44, false },
  48. { ACT_DOD_STAND_IDLE, ACT_DOD_STAND_IDLE_MP44, false },
  49. { ACT_DOD_CROUCH_IDLE, ACT_DOD_CROUCH_IDLE_MP44, false },
  50. { ACT_DOD_CROUCHWALK_IDLE, ACT_DOD_CROUCHWALK_IDLE_MP44, false },
  51. { ACT_DOD_WALK_IDLE, ACT_DOD_WALK_IDLE_MP44, false },
  52. { ACT_DOD_RUN_IDLE, ACT_DOD_RUN_IDLE_MP44, false },
  53. { ACT_SPRINT, ACT_DOD_SPRINT_IDLE_MP44, false },
  54. // Attack ( prone? )
  55. { ACT_RANGE_ATTACK1, ACT_DOD_PRIMARYATTACK_MP44, false },
  56. { ACT_DOD_PRIMARYATTACK_CROUCH, ACT_DOD_PRIMARYATTACK_MP44, false },
  57. { ACT_DOD_PRIMARYATTACK_PRONE, ACT_DOD_PRIMARYATTACK_PRONE_MP44, false },
  58. // Reload ( prone? )
  59. { ACT_RELOAD, ACT_DOD_RELOAD_MP44, false },
  60. { ACT_DOD_RELOAD_CROUCH, ACT_DOD_RELOAD_CROUCH_MP44, false },
  61. { ACT_DOD_RELOAD_PRONE, ACT_DOD_RELOAD_PRONE_MP44, false },
  62. // Hand Signals
  63. { ACT_DOD_HS_IDLE, ACT_DOD_HS_IDLE_MP44, false },
  64. { ACT_DOD_HS_CROUCH, ACT_DOD_HS_CROUCH_MP44, false },
  65. };
  66. IMPLEMENT_ACTTABLE( CWeaponMP44 );