EntityEffect: Inlined functions, added explicit copy constructor and operator.

This commit is contained in:
archshift
2014-07-13 15:43:49 -07:00
parent f77723128c
commit 0409daf736
2 changed files with 29 additions and 20 deletions
+11 -3
View File
@@ -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 */