From a1a8b7c0eee2189dfc129eb366edb43a315749f9 Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 8 Jun 2014 16:31:18 -0700 Subject: [PATCH] Splash potion: Adjusted speed, fixed spawn position --- src/Items/ItemPotion.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h index 4c67e9dc7..029bb52cd 100644 --- a/src/Items/ItemPotion.h +++ b/src/Items/ItemPotion.h @@ -124,14 +124,11 @@ public: virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override { - Vector3d Speed = a_Player->GetLookVector() * 10; + Vector3d Pos = a_Player->GetThrowStartPos(); + Vector3d Speed = a_Player->GetLookVector() * 7; short potion_damage = a_Item.m_ItemDamage; - cSplashPotionEntity * Projectile = new cSplashPotionEntity(a_Player, - (double)a_BlockX, - (double)a_BlockY, - (double)a_BlockZ, - &Speed, + cSplashPotionEntity *Projectile = new cSplashPotionEntity(a_Player, Pos.x, Pos.y, Pos.z, &Speed, GetEntityEffectType(potion_damage), cEntityEffect(GetEntityEffectDuration(potion_damage), GetEntityEffectIntensity(potion_damage),