summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-14 00:43:49 +0200
committerarchshift <admin@archshift.com>2014-07-14 00:43:49 +0200
commit0409daf7360d503e9e2b6258fa2582d7bdd7e5a0 (patch)
treef57edc3d6753017a6652b6bea86566aaa67ab3a3 /src/Entities/EntityEffect.cpp
parentChanged separating comment style from asterisks to slashes. (diff)
downloadcuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar.gz
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar.bz2
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar.lz
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar.xz
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.tar.zst
cuberite-0409daf7360d503e9e2b6258fa2582d7bdd7e5a0.zip
Diffstat (limited to 'src/Entities/EntityEffect.cpp')
-rw-r--r--src/Entities/EntityEffect.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index be501297c..852099b79 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -33,7 +33,11 @@ cEntityEffect::cEntityEffect(int a_Duration, short a_Intensity, double a_Distanc
-cEntityEffect::~cEntityEffect()
+cEntityEffect::cEntityEffect(const cEntityEffect & a_OtherEffect):
+ m_Ticks(a_OtherEffect.m_Ticks),
+ m_Duration(a_OtherEffect.m_Duration),
+ m_Intensity(a_OtherEffect.m_Intensity),
+ m_DistanceModifier(a_OtherEffect.m_DistanceModifier)
{
}
@@ -42,6 +46,19 @@ cEntityEffect::~cEntityEffect()
+cEntityEffect & cEntityEffect::operator=(cEntityEffect a_OtherEffect)
+{
+ std::swap(m_Ticks, a_OtherEffect.m_Ticks);
+ std::swap(m_Duration, a_OtherEffect.m_Duration);
+ std::swap(m_Intensity, a_OtherEffect.m_Intensity);
+ std::swap(m_DistanceModifier, a_OtherEffect.m_DistanceModifier);
+ return *this;
+}
+
+
+
+
+
cEntityEffect * cEntityEffect::CreateEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier)
{
switch (a_EffectType)
@@ -90,22 +107,6 @@ void cEntityEffect::OnTick(cPawn & a_Target)
-void cEntityEffect::OnActivate(cPawn & a_Target)
-{
-}
-
-
-
-
-
-void cEntityEffect::OnDeactivate(cPawn & a_Target)
-{
-}
-
-
-
-
-
/////////////////////////////////////////////////////////////////////////
// Instant Health
/////////////////////////////////////////////////////////////////////////