summaryrefslogtreecommitdiffstats
path: root/src/Entities/ArrowEntity.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-19 18:13:41 +0100
committerGitHub <noreply@github.com>2020-03-19 18:13:41 +0100
commit0e07e231a219fb810c100e1cd823ef7585f7e2ff (patch)
tree909e132bd66492606fc1b470284da448372f5534 /src/Entities/ArrowEntity.cpp
parentAdded myself to CONTRIBUTORS file (#4515) (diff)
downloadcuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar.gz
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar.bz2
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar.lz
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar.xz
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.tar.zst
cuberite-0e07e231a219fb810c100e1cd823ef7585f7e2ff.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ArrowEntity.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 249ff42d0..6fef2c7ee 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -115,9 +115,13 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
Damage += ExtraDamage;
}
+ double Knockback = 10;
+
unsigned int PunchLevel = m_CreatorData.m_Enchantments.GetLevel(cEnchantments::enchPunch);
- double KnockbackAmount = 11 + 10 * PunchLevel;
- a_EntityHit.TakeDamage(dtRangedAttack, GetCreatorUniqueID(), Damage, KnockbackAmount);
+ unsigned int PunchLevelMultiplier = 8;
+
+ Knockback += PunchLevelMultiplier * PunchLevel;
+ a_EntityHit.TakeDamage(dtRangedAttack, GetCreatorUniqueID(), Damage, Knockback);
if (IsOnFire() && !a_EntityHit.IsInWater())
{