diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-29 23:41:31 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-29 23:41:31 +0200 |
commit | 428cfb5c21ec5a35252b967eb306d6ba9b8e11b3 (patch) | |
tree | a0b3e28ea6d4b9deb4c063449afe7d5e78f38ff3 /src/Entities/ArrowEntity.cpp | |
parent | An unification of code style (diff) | |
download | cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar.gz cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar.bz2 cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar.lz cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar.xz cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.tar.zst cuberite-428cfb5c21ec5a35252b967eb306d6ba9b8e11b3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/ArrowEntity.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp index db9dc781a..c76c710ef 100644 --- a/src/Entities/ArrowEntity.cpp +++ b/src/Entities/ArrowEntity.cpp @@ -69,7 +69,9 @@ bool cArrowEntity::CanPickup(const cPlayer & a_Player) const void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) { Vector3d Hit = a_HitPos; - Hit += GetSpeed() / 700; // Make arrow sink into block a little + Vector3d SinkMovement = GetSpeed() / 800; + SinkMovement.Clamp(0.001, 0.001, 0.001, 0.05, 0.05, 0.05); + Hit += SinkMovement; // Make arrow sink into block a little super::OnHitSolidBlock(Hit, a_HitFace); int X = (int)floor(Hit.x), Y = (int)floor(Hit.y), Z = (int)floor(Hit.z); |