Counter Strike : Global Offensive Source Code
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.

60 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_csbasegun.h"
  8. #if defined( CLIENT_DLL )
  9. #define CDEagle C_DEagle
  10. #include "c_cs_player.h"
  11. #else
  12. #include "cs_player.h"
  13. #endif
  14. // NOTE: This has to be the last file included!
  15. #include "tier0/memdbgon.h"
  16. class CDEagle : public CWeaponCSBaseGun
  17. {
  18. public:
  19. DECLARE_CLASS( CDEagle, CWeaponCSBaseGun );
  20. DECLARE_NETWORKCLASS();
  21. DECLARE_PREDICTABLE();
  22. CDEagle();
  23. // overload for dryfire animation
  24. virtual bool SendWeaponAnim( int iActivity );
  25. virtual CSWeaponID GetCSWeaponID( void ) const { return WEAPON_DEAGLE; }
  26. private:
  27. CDEagle( const CDEagle & );
  28. };
  29. IMPLEMENT_NETWORKCLASS_ALIASED( DEagle, DT_WeaponDEagle )
  30. BEGIN_NETWORK_TABLE( CDEagle, DT_WeaponDEagle )
  31. END_NETWORK_TABLE()
  32. BEGIN_PREDICTION_DATA( CDEagle )
  33. END_PREDICTION_DATA()
  34. LINK_ENTITY_TO_CLASS_ALIASED( weapon_deagle, DEagle );
  35. // PRECACHE_REGISTER( weapon_deagle );
  36. CDEagle::CDEagle()
  37. {
  38. }
  39. bool CDEagle::SendWeaponAnim( int iActivity )
  40. {
  41. if ( iActivity == ACT_VM_PRIMARYATTACK && m_iClip1 == 1 )
  42. iActivity = ACT_VM_DRYFIRE;
  43. return BaseClass::SendWeaponAnim( iActivity );
  44. }