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