summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/EntityEffect.cpp')
-rw-r--r--src/Entities/EntityEffect.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index 3e28392f4..58b76b21b 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -233,6 +233,47 @@ void cEntityEffect::OnTick(cPawn & a_Target)
////////////////////////////////////////////////////////////////////////////////
+// cEntityEffectSpeed:
+
+void cEntityEffectSpeed::OnActivate(cPawn & a_Target)
+{
+ // TODO: Add SetMormalMaxSpeed to cMonster
+
+ if (!a_Target.IsPlayer())
+ {
+ return;
+ }
+ cPlayer * Player = (cPlayer*) &a_Target;
+
+ Player->SetNormalMaxSpeed(1.0 + 0.2 * m_Intensity);
+ Player->SetSprintingMaxSpeed(1.3 + 0.26 * m_Intensity);
+ Player->SetFlyingMaxSpeed(1.0 + 0.2 * m_Intensity);
+}
+
+
+
+
+
+void cEntityEffectSpeed::OnDeactivate(cPawn & a_Target)
+{
+ // TODO: Add SetMormalMaxSpeed to cMonster
+
+ if (!a_Target.IsPlayer())
+ {
+ return;
+ }
+ cPlayer * Player = (cPlayer*) &a_Target;
+
+ Player->SetNormalMaxSpeed(1.0);
+ Player->SetSprintingMaxSpeed(1.3);
+ Player->SetFlyingMaxSpeed(1.0);
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////
// cEntityEffectInstantHealth:
void cEntityEffectInstantHealth::OnActivate(cPawn & a_Target)