From 0409daf7360d503e9e2b6258fa2582d7bdd7e5a0 Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 13 Jul 2014 15:43:49 -0700 Subject: EntityEffect: Inlined functions, added explicit copy constructor and operator. --- src/Entities/EntityEffect.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/Entities/EntityEffect.h') diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h index 6e53d83b8..c6532a9bd 100644 --- a/src/Entities/EntityEffect.h +++ b/src/Entities/EntityEffect.h @@ -45,7 +45,15 @@ public: @param a_DistanceModifier The distance modifier for affecting potency, defaults to 1 */ cEntityEffect(int a_Duration, short a_Intensity, double a_DistanceModifier = 1); - virtual ~cEntityEffect(void); + /** Creates an entity effect by copying another + @param a_OtherEffect The other effect to copy */ + cEntityEffect(const cEntityEffect & a_OtherEffect); + + /** Creates an entity effect by copying another + @param a_OtherEffect The other effect to copy */ + cEntityEffect & operator=(cEntityEffect a_OtherEffect); + + virtual ~cEntityEffect(void) {}; /** Creates a pointer to the proper entity effect from the effect type @warning This function creates raw pointers that must be manually managed. @@ -70,8 +78,8 @@ public: void SetDistanceModifier(double a_DistanceModifier) { m_DistanceModifier = a_DistanceModifier; } virtual void OnTick(cPawn & a_Target); - virtual void OnActivate(cPawn & a_Target); - virtual void OnDeactivate(cPawn & a_Target); + virtual void OnActivate(cPawn & a_Target) { } + virtual void OnDeactivate(cPawn & a_Target) { } protected: /** How many ticks this effect has been active for */ -- cgit v1.2.3