diff options
Diffstat (limited to 'src/Entities/EntityEffects.h')
-rw-r--r-- | src/Entities/EntityEffects.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Entities/EntityEffects.h b/src/Entities/EntityEffects.h index 26d2c92e5..6b2532aae 100644 --- a/src/Entities/EntityEffects.h +++ b/src/Entities/EntityEffects.h @@ -35,9 +35,12 @@ public: effSaturation = 23, } ; - /** The duration of the effect */ + /** How many ticks this effect has been active for */ int m_Ticks; + /** Returns the duration of the effect */ + int GetDuration() { return m_Duration; } + /** Returns how strong the effect will be applied */ short GetIntensity() { return m_Intensity; } @@ -47,6 +50,7 @@ public: /** Returns the distance modifier for affecting potency */ double GetDistanceModifier() { return m_DistanceModifier; } + void SetDuration(int a_Duration) { m_Duration = a_Duration; } void SetIntensity(short a_Intensity) { m_Intensity = a_Intensity; } void SetUser(cPawn *a_User) { m_User = a_User; } void SetDistanceModifier(double a_DistanceModifier) { m_DistanceModifier = a_DistanceModifier; } @@ -58,14 +62,17 @@ public: /** * An entity effect - * @param a_Ticks The duration of the effect + * @param a_Duration How long this effect will last * @param a_Intensity How strong the effect will be applied * @param a_User The pawn that used this entity effect * @param a_DistanceModifier The distance modifier for affecting potency, defaults to 1 */ - cEntityEffect(int a_Ticks, short a_Intensity, cPawn *a_User, double a_DistanceModifier = 1); + cEntityEffect(int a_Duration, short a_Intensity, cPawn *a_User, double a_DistanceModifier = 1); private: + /** How long this effect will last */ + int m_Duration; + /** How strong the effect will be applied */ short m_Intensity; |