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.

57 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WEAPON_DODBASE_MELEE_H
  7. #define WEAPON_DODBASE_MELEE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "weapon_dodbase.h"
  12. #if defined( CLIENT_DLL )
  13. #define CWeaponDODBaseMelee C_WeaponDODBaseMelee
  14. #endif
  15. // ----------------------------------------------------------------------------- //
  16. // class definition.
  17. // ----------------------------------------------------------------------------- //
  18. class CWeaponDODBaseMelee : public CWeaponDODBase
  19. {
  20. public:
  21. DECLARE_CLASS( CWeaponDODBaseMelee, CWeaponDODBase );
  22. DECLARE_NETWORKCLASS();
  23. DECLARE_PREDICTABLE();
  24. #ifndef CLIENT_DLL
  25. DECLARE_DATADESC();
  26. #endif
  27. CWeaponDODBaseMelee();
  28. virtual void Spawn();
  29. virtual void PrimaryAttack();
  30. virtual void WeaponIdle();
  31. virtual DODWeaponID GetWeaponID( void ) const { return WEAPON_NONE; }
  32. virtual bool ShouldDrawCrosshair( void ) { return false; }
  33. virtual bool HasPrimaryAmmo() { return true; }
  34. virtual bool CanBeSelected() { return true; }
  35. virtual CBaseEntity *MeleeAttack( int iDamageAmount, int iDamageType, float flDmgDelay, float flAttackDelay );
  36. //virtual const char *GetSecondaryDeathNoticeName( void ) { return "stab"; }
  37. public:
  38. CDODWeaponInfo *m_pWeaponInfo;
  39. private:
  40. CWeaponDODBaseMelee( const CWeaponDODBaseMelee & ) {}
  41. };
  42. #endif // WEAPON_DODBASE_MELEE_H