summaryrefslogtreecommitdiffstats
path: root/src/Entities/ArrowEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-17 22:50:58 +0200
committermadmaxoft <github@xoft.cz>2014-07-17 22:50:58 +0200
commit5e198c673009cf8ca9d92cf59848999bc96bbc37 (patch)
treee75f01b222867e2ff08b4390fb66f084521606da /src/Entities/ArrowEntity.cpp
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar.gz
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar.bz2
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar.lz
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar.xz
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.tar.zst
cuberite-5e198c673009cf8ca9d92cf59848999bc96bbc37.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ArrowEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index c0e361fea..913519c4c 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -72,7 +72,7 @@ bool cArrowEntity::CanPickup(const cPlayer & a_Player) const
void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
-{
+{
if (GetSpeed().EqualsEps(Vector3d(0, 0, 0), 0.0000001))
{
SetSpeed(GetLookVector().NormalizeCopy() * 0.1); // Ensure that no division by zero happens later
@@ -97,7 +97,7 @@ void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFa
void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
-{
+{
int Damage = (int)(GetSpeed().Length() / 20 * m_DamageCoeff + 0.5);
if (m_IsCritical)
{