diff options
author | archshift <admin@archshift.com> | 2014-07-20 11:56:59 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-26 12:48:16 +0200 |
commit | 0298d34406b1582e882795bf4d9d3fea18fd0135 (patch) | |
tree | 764cf6c7089b3a80f5a4c457d6c44f963deb2a1f /src/Entities/SplashPotionEntity.cpp | |
parent | Endianness.h: undefined ntohll before redefining (diff) | |
download | cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar.gz cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar.bz2 cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar.lz cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar.xz cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.tar.zst cuberite-0298d34406b1582e882795bf4d9d3fea18fd0135.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/SplashPotionEntity.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp index 6d874e957..d874a86e1 100644 --- a/src/Entities/SplashPotionEntity.cpp +++ b/src/Entities/SplashPotionEntity.cpp @@ -72,17 +72,21 @@ 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 + 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_EntityEffectType(cEntityEffect::effNoEffect), + m_EntityEffect(cEntityEffect()), + m_PotionColor(0), 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); } |