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.

46 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef DAMAGEMODIFIER_H
  8. #define DAMAGEMODIFIER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class CBaseEntity;
  13. #include "ehandle.h"
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Class handling generic damage modification to & from a player
  16. //-----------------------------------------------------------------------------
  17. class CDamageModifier
  18. {
  19. public:
  20. CDamageModifier();
  21. void AddModifierToEntity( CBaseEntity *pChar );
  22. void RemoveModifier();
  23. void SetModifier( float flDamageScale );
  24. float GetModifier() const;
  25. void SetDoneToMe( bool bDoneToMe );
  26. bool IsDamageDoneToMe() const;
  27. CBaseEntity *GetCharacter() const;
  28. private:
  29. float m_flModifier;
  30. CHandle<CBaseEntity> m_hEnt;
  31. bool m_bDoneToMe; // True = modifies damage done to the entity, false = damage done by the entity
  32. };
  33. #endif // DAMAGEMODIFIER_H