1
0

Moved potion static functions to EntityEffect to create splash potions through world

This commit is contained in:
archshift
2014-07-20 02:56:59 -07:00
parent 1595ef73dc
commit 0298d34406
7 changed files with 164 additions and 139 deletions

View File

@@ -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);
}