summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-20 10:43:07 +0200
committerarchshift <admin@archshift.com>2014-07-20 10:43:07 +0200
commit726312602d293117fc4999897ef56869f2fef534 (patch)
treedfaa3c6349c91fc70d8b351496a9c0b3d8d12784 /src/Entities/ProjectileEntity.cpp
parentAdded destroy-timer system to splash potion entities (diff)
downloadcuberite-726312602d293117fc4999897ef56869f2fef534.tar
cuberite-726312602d293117fc4999897ef56869f2fef534.tar.gz
cuberite-726312602d293117fc4999897ef56869f2fef534.tar.bz2
cuberite-726312602d293117fc4999897ef56869f2fef534.tar.lz
cuberite-726312602d293117fc4999897ef56869f2fef534.tar.xz
cuberite-726312602d293117fc4999897ef56869f2fef534.tar.zst
cuberite-726312602d293117fc4999897ef56869f2fef534.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index a55c9b895..b5e81bc0c 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -146,9 +146,11 @@ public:
(a_Entity->GetUniqueID() == m_Projectile->GetCreatorUniqueID()) // Do not check whoever shot the projectile
)
{
- // TODO: Don't check creator only for the first 5 ticks
- // so that arrows stuck in ground and dug up can hurt the player
- return false;
+ // Don't check creator only for the first 5 ticks so that projectiles can collide with the creator
+ if (m_Projectile->GetTicksAlive() <= 5)
+ {
+ return false;
+ }
}
cBoundingBox EntBox(a_Entity->GetPosition(), a_Entity->GetWidth() / 2, a_Entity->GetHeight());