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.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef TF_WEAPON_BONESAW_H
  7. #define TF_WEAPON_BONESAW_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_weaponbase_melee.h"
  12. #ifdef CLIENT_DLL
  13. #include "tf_weapon_medigun.h"
  14. #define CTFBonesaw C_TFBonesaw
  15. #endif
  16. enum bonesaw_weapontypes_t
  17. {
  18. BONESAW_DEFAULT = 0,
  19. BONESAW_UBER_ONHIT,
  20. BONESAW_UBER_SAVEDONDEATH,
  21. BONESAW_RADIUSHEAL,
  22. BONESAW_TONGS,
  23. };
  24. //=============================================================================
  25. //
  26. // Bonesaw class.
  27. //
  28. class CTFBonesaw : public CTFWeaponBaseMelee
  29. {
  30. public:
  31. DECLARE_CLASS( CTFBonesaw, CTFWeaponBaseMelee );
  32. DECLARE_NETWORKCLASS();
  33. DECLARE_PREDICTABLE();
  34. CTFBonesaw() {}
  35. virtual void Activate( void );
  36. virtual int GetWeaponID( void ) const
  37. {
  38. const CEconItemView *pEconItemView = GetAttributeContainer()->GetItem();
  39. if ( !V_strcmp( pEconItemView->GetItemDefinition()->GetDefinitionName(), "Harvester" ) )
  40. return TF_WEAPON_HARVESTER_SAW;
  41. return TF_WEAPON_BONESAW;
  42. }
  43. virtual void SecondaryAttack();
  44. virtual bool DefaultDeploy( char *szViewModel, char *szWeaponModel, int iActivity, char *szAnimExt );
  45. int GetBonesawType( void ) const { int iMode = 0; CALL_ATTRIB_HOOK_INT( iMode, set_weapon_mode ); return iMode; };
  46. virtual void DoMeleeDamage( CBaseEntity* ent, trace_t& trace ) OVERRIDE;
  47. float GetProgress( void ) { return 0; }
  48. int GetCount( void );
  49. const char* GetEffectLabelText( void ) { return "#TF_ORGANS"; }
  50. float GetBoneSawSpeedMod( void );
  51. #ifdef CLIENT_DLL
  52. virtual void OnDataChanged( DataUpdateType_t updateType );
  53. void UpdateChargePoseParam( void );
  54. virtual void GetPoseParameters( CStudioHdr *pStudioHdr, float poseParameter[MAXSTUDIOPOSEPARAM] );
  55. virtual void UpdateAttachmentModels( void );
  56. #endif
  57. private:
  58. #ifdef CLIENT_DLL
  59. int m_iUberChargePoseParam;
  60. float m_flChargeLevel;
  61. #endif
  62. CTFBonesaw( const CTFBonesaw & ) {}
  63. };
  64. #endif // TF_WEAPON_BONESAW_H