From 4e6395d6ff9f34edb4dd36dc1f8e845c56b499f4 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 11 Jul 2014 17:27:29 -0700 Subject: For now, removed creator member from Entity Effect for pointer safety --- src/Items/ItemPotion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items') diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h index 43b9f280d..5badeda94 100644 --- a/src/Items/ItemPotion.h +++ b/src/Items/ItemPotion.h @@ -123,7 +123,7 @@ public: Vector3d Speed = a_Player->GetLookVector() * 7; short potion_damage = a_Item.m_ItemDamage; - 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)); + cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed, GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage)), GetPotionName(potion_damage)); if (Projectile == NULL) { return false; @@ -146,7 +146,7 @@ public: virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override { // Called when potion is a drinkable potion - a_Player->AddEntityEffect(GetEntityEffectType(a_Item->m_ItemDamage), GetEntityEffectDuration(a_Item->m_ItemDamage), GetEntityEffectIntensity(a_Item->m_ItemDamage), a_Player); + a_Player->AddEntityEffect(GetEntityEffectType(a_Item->m_ItemDamage), GetEntityEffectDuration(a_Item->m_ItemDamage), GetEntityEffectIntensity(a_Item->m_ItemDamage)); a_Player->GetInventory().RemoveOneEquippedItem(); a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE); return true; -- cgit v1.2.3