summaryrefslogtreecommitdiffstats
path: root/src/Entities/SplashPotionEntity.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:45:45 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:50:18 +0100
commitca6ef58b1ee8521e4b940ee4883dee714960e413 (patch)
tree8532add455224b07c07a759e3d906f50c0695888 /src/Entities/SplashPotionEntity.cpp
parentMerge pull request #2972 from marvinkopf/PlayerAutoComplete (diff)
downloadcuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip
Diffstat (limited to 'src/Entities/SplashPotionEntity.cpp')
-rw-r--r--src/Entities/SplashPotionEntity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp
index ba806e50e..e61df0525 100644
--- a/src/Entities/SplashPotionEntity.cpp
+++ b/src/Entities/SplashPotionEntity.cpp
@@ -34,7 +34,7 @@ public:
m_EntityEffect(a_EntityEffect)
{
}
-
+
/** Called by cWorld::ForEachEntity(), adds the stored entity effect to the entity, if it is close enough. */
virtual bool Item(cEntity * a_Entity) override
{
@@ -55,7 +55,7 @@ public:
// TODO: better equation
double Reduction = -0.25 * SplashDistance + 1.0;
Reduction = std::max(Reduction, 0.0);
-
+
static_cast<cPawn *>(a_Entity)->AddEntityEffect(m_EntityEffectType, m_EntityEffect.GetDuration(), m_EntityEffect.GetIntensity(), Reduction);
return false;
}
@@ -65,7 +65,7 @@ private:
cEntityEffect::eType m_EntityEffectType;
const cEntityEffect & m_EntityEffect;
};
-
+
@@ -120,7 +120,7 @@ void cSplashPotionEntity::Splash(const Vector3d & a_HitPos)
{
cSplashPotionCallback Callback(a_HitPos, m_EntityEffectType, m_EntityEffect);
m_World->ForEachEntity(Callback);
-
+
m_World->BroadcastSoundParticleEffect(
EffectID::PARTICLE_SPLASH_POTION,
FloorC(a_HitPos.x),