diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-29 16:27:19 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-29 16:27:19 +0200 |
commit | 8811837aea2a33ba5da424087429864f811bf5e5 (patch) | |
tree | baeedba8fb618766cf7d4e1657d2d48c84f45a59 /src/Entities/SplashPotionEntity.cpp | |
parent | Suggestions (diff) | |
parent | DistortedHeightmap: Now generates gravel in deep ocean. (diff) | |
download | cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.gz cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.bz2 cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.lz cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.xz cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.zst cuberite-8811837aea2a33ba5da424087429864f811bf5e5.zip |
Diffstat (limited to 'src/Entities/SplashPotionEntity.cpp')
-rw-r--r-- | src/Entities/SplashPotionEntity.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp index 6d874e957..fd1a0179b 100644 --- a/src/Entities/SplashPotionEntity.cpp +++ b/src/Entities/SplashPotionEntity.cpp @@ -72,17 +72,18 @@ cSplashPotionEntity::cSplashPotionEntity( cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed, - cEntityEffect::eType a_EntityEffectType, - cEntityEffect a_EntityEffect, - int a_PotionColor + const cItem & a_Item ) : super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25), - m_EntityEffectType(a_EntityEffectType), - m_EntityEffect(a_EntityEffect), - m_PotionColor(a_PotionColor), m_DestroyTimer(-1) { SetSpeed(a_Speed); + m_EntityEffectType = cEntityEffect::GetPotionEffectType(a_Item.m_ItemDamage); + m_EntityEffect = cEntityEffect( + cEntityEffect::GetPotionEffectDuration(a_Item.m_ItemDamage), + cEntityEffect::GetPotionEffectIntensity(a_Item.m_ItemDamage) + ); + m_PotionColor = cEntityEffect::GetPotionColor(a_Item.m_ItemDamage); } |