diff options
author | Mattes D <github@xoft.cz> | 2014-04-25 23:41:04 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-04-25 23:41:04 +0200 |
commit | 43cca14763aa2a58150dec4b69bc31548f49ac36 (patch) | |
tree | 50008e0a730b255a55872ddb5784f483acb56cea /src/Entities/ProjectileEntity.h | |
parent | Merge pull request #938 from archshift/xcode-oops (diff) | |
parent | Creator not user. (diff) | |
download | cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar.gz cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar.bz2 cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar.lz cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar.xz cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.tar.zst cuberite-43cca14763aa2a58150dec4b69bc31548f49ac36.zip |
Diffstat (limited to 'src/Entities/ProjectileEntity.h')
-rw-r--r-- | src/Entities/ProjectileEntity.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h index efb7ae783..731dd060e 100644 --- a/src/Entities/ProjectileEntity.h +++ b/src/Entities/ProjectileEntity.h @@ -166,6 +166,9 @@ protected: /// Timer for client arrow position confirmation via TeleportEntity float m_HitGroundTimer; + + // Whether the arrow has already been teleported into the proper position in the ground. + bool m_HasTeleported; /// If true, the arrow is in the process of being collected - don't go to anyone else bool m_bIsCollected; @@ -205,7 +208,11 @@ protected: // cProjectileEntity overrides: virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override; - + virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override; + + // Randomly decides whether to spawn a chicken where the egg lands. + void TrySpawnChicken(const Vector3d & a_HitPos); + // tolua_begin } ; @@ -233,6 +240,10 @@ protected: // cProjectileEntity overrides: virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override; + virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override; + + // Teleports the creator where the ender pearl lands. + void TeleportCreator(const Vector3d & a_HitPos); // tolua_begin |