Removed long function wrapping
This commit is contained in:
parent
3766ac96d7
commit
68011a004a
@ -69,8 +69,7 @@ void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffect a_E
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_EntityEffects[a_EffectType] = a_Effect;
|
m_EntityEffects[a_EffectType] = a_Effect;
|
||||||
m_World->BroadcastEntityEffect(*this, a_EffectType, a_Effect.GetIntensity(),
|
m_World->BroadcastEntityEffect(*this, a_EffectType, a_Effect.GetIntensity(), a_Effect.m_Ticks * a_Effect.GetDistanceModifier());
|
||||||
a_Effect.m_Ticks * a_Effect.GetDistanceModifier());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,12 +123,7 @@ public:
|
|||||||
Vector3d Speed = a_Player->GetLookVector() * 7;
|
Vector3d Speed = a_Player->GetLookVector() * 7;
|
||||||
|
|
||||||
short potion_damage = a_Item.m_ItemDamage;
|
short potion_damage = a_Item.m_ItemDamage;
|
||||||
cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed,
|
cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed, GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage), a_Player), GetPotionName(potion_damage));
|
||||||
GetEntityEffectType(potion_damage),
|
|
||||||
cEntityEffect(GetEntityEffectDuration(potion_damage),
|
|
||||||
GetEntityEffectIntensity(potion_damage),
|
|
||||||
a_Player),
|
|
||||||
GetPotionName(potion_damage));
|
|
||||||
if (Projectile == NULL)
|
if (Projectile == NULL)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -152,10 +147,7 @@ public:
|
|||||||
{
|
{
|
||||||
// Called when potion is a drinkable potion
|
// Called when potion is a drinkable potion
|
||||||
short potion_damage = a_Item->m_ItemDamage;
|
short potion_damage = a_Item->m_ItemDamage;
|
||||||
a_Player->AddEntityEffect(GetEntityEffectType(potion_damage),
|
a_Player->AddEntityEffect(GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage), a_Player));
|
||||||
cEntityEffect(GetEntityEffectDuration(potion_damage),
|
|
||||||
GetEntityEffectIntensity(potion_damage),
|
|
||||||
a_Player));
|
|
||||||
a_Player->GetInventory().RemoveOneEquippedItem();
|
a_Player->GetInventory().RemoveOneEquippedItem();
|
||||||
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
|
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user