diff options
author | archshift <admin@archshift.com> | 2014-06-09 01:31:18 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-06-17 20:39:20 +0200 |
commit | a1a8b7c0eee2189dfc129eb366edb43a315749f9 (patch) | |
tree | da31863da9d223a5707c0c1c19db424421038d14 /src/Items | |
parent | Entity effect type: use 'eff' as a prefix instead of 'ef' (diff) | |
download | cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar.gz cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar.bz2 cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar.lz cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar.xz cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.tar.zst cuberite-a1a8b7c0eee2189dfc129eb366edb43a315749f9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemPotion.h | 9 |
1 files 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), |