summaryrefslogtreecommitdiffstats
path: root/source/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-02 21:40:56 +0200
committermadmaxoft <github@xoft.cz>2013-09-02 21:40:56 +0200
commit7433b3723ca06575e986ea48fd4a2a2af4047189 (patch)
tree05267769b8f15471445b8683a7ee0ddf82f8d9ac /source/Entities/ProjectileEntity.cpp
parentcBoundingBox: Only forward collisions are calculated. (diff)
downloadcuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar.gz
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar.bz2
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar.lz
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar.xz
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.tar.zst
cuberite-7433b3723ca06575e986ea48fd4a2a2af4047189.zip
Diffstat (limited to 'source/Entities/ProjectileEntity.cpp')
-rw-r--r--source/Entities/ProjectileEntity.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/Entities/ProjectileEntity.cpp b/source/Entities/ProjectileEntity.cpp
index ed7803410..8bc9abdb0 100644
--- a/source/Entities/ProjectileEntity.cpp
+++ b/source/Entities/ProjectileEntity.cpp
@@ -85,9 +85,13 @@ public:
virtual bool Item(cEntity * a_Entity) override
{
- if (a_Entity == m_Projectile)
+ if (
+ (a_Entity == m_Projectile) || // Do not check collisions with self
+ (a_Entity == m_Projectile->GetCreator()) // Do not check whoever shot the projectile
+ )
{
- // Self-colision
+ // 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;
}