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.

66 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef TF_WEARABLE_ITEM_DEMOSHIELD_H
  7. #define TF_WEARABLE_ITEM_DEMOSHIELD_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "cbase.h"
  12. #include "tf_shareddefs.h"
  13. #include "tf_item_wearable.h"
  14. #ifdef CLIENT_DLL
  15. #include "c_tf_player.h"
  16. #include "tf_viewmodel.h"
  17. #include "bone_setup.h"
  18. #else
  19. #include "tf_player.h"
  20. #endif
  21. #ifdef CLIENT_DLL
  22. #define CTFWearableDemoShield C_TFWearableDemoShield
  23. class C_TFSword;
  24. #endif
  25. //=============================================================================
  26. //
  27. //
  28. //
  29. class CTFWearableDemoShield : public CTFWearable
  30. {
  31. DECLARE_CLASS( CTFWearableDemoShield, CTFWearable );
  32. public:
  33. DECLARE_NETWORKCLASS();
  34. DECLARE_DATADESC();
  35. CTFWearableDemoShield();
  36. virtual void Precache();
  37. void DoSpecialAction( CTFPlayer *pPlayer );
  38. void EndSpecialAction( CTFPlayer *pPlayer );
  39. // Charge
  40. bool CanCharge( CTFPlayer *pPlayer );
  41. void DoCharge( CTFPlayer *pPlayer );
  42. void ShieldBash( CTFPlayer *pPlayer, float flCurrentChargeMeter );
  43. virtual void Equip( CBasePlayer* pOwner );
  44. virtual void UnEquip( CBasePlayer* pOwner );
  45. float CalculateChargeDamage( float flCurrentChargeMeter );
  46. Vector GetShieldDamageForce( float flCurrentChargeMeter );
  47. private:
  48. #ifdef GAME_DLL
  49. bool m_bImpactedSomething;
  50. #endif
  51. };
  52. #endif // TF_WEARABLE_ITEM_DEMOSHIELD_H