diff options
author | madmaxoft <github@xoft.cz> | 2013-08-30 18:10:58 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-30 18:10:58 +0200 |
commit | d7a52870003e46858bec65cc76880cecc5de7bb8 (patch) | |
tree | 67d10f543dc8ed0b49da5ecb61cc0d989a246309 /source/Entities/ProjectileEntity.h | |
parent | Moved throw pos and speed calculation from cProjectileEntity into cPlayer. (diff) | |
download | cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar.gz cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar.bz2 cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar.lz cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar.xz cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.tar.zst cuberite-d7a52870003e46858bec65cc76880cecc5de7bb8.zip |
Diffstat (limited to 'source/Entities/ProjectileEntity.h')
-rw-r--r-- | source/Entities/ProjectileEntity.h | 93 |
1 files changed, 91 insertions, 2 deletions
diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h index aa7ecc772..95dc00abc 100644 --- a/source/Entities/ProjectileEntity.h +++ b/source/Entities/ProjectileEntity.h @@ -78,6 +78,7 @@ protected: // cEntity overrides: virtual void Tick(float a_Dt, cChunk & a_Chunk) override; virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) override; + virtual void SpawnOn(cClientHandle & a_Client) override; // tolua_begin } ; @@ -105,7 +106,7 @@ public: CLASS_PROTODEF(cArrowEntity); /// Creates a new arrow with psNoPickup state and default damage modifier coeff - cArrowEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d a_Speed); + cArrowEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed); /// Creates a new arrow as shot by a player, initializes it from the player object cArrowEntity(cPlayer & a_Player, double a_Force); @@ -137,12 +138,100 @@ protected: /// The coefficient applied to the damage that the arrow will deal, based on the bow enchantment. 2.0 for normal arrow double m_DamageCoeff; - // cEntity overrides: + // cProjectileEntity overrides: virtual void SpawnOn(cClientHandle & a_Client) override; // tolua_begin } ; + + + + +class cThrownEggEntity : + public cProjectileEntity +{ + typedef cProjectileEntity super; + +public: + + // tolua_end + + CLASS_PROTODEF(cThrownEggEntity); + + cThrownEggEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed); + +protected: + + // tolua_end + + // cProjectileEntity overrides: + virtual void OnHitSolidBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace) override; + + // tolua_begin + +} ; + + + + + +class cThrownEnderPearlEntity : + public cProjectileEntity +{ + typedef cProjectileEntity super; + +public: + + // tolua_end + + CLASS_PROTODEF(cThrownEnderPearlEntity); + + cThrownEnderPearlEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed); + +protected: + + // tolua_end + + // cProjectileEntity overrides: + virtual void OnHitSolidBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace) override; + + // tolua_begin + +} ; + + + + + +class cThrownSnowballEntity : + public cProjectileEntity +{ + typedef cProjectileEntity super; + +public: + + // tolua_end + + CLASS_PROTODEF(cThrownSnowballEntity); + + cThrownSnowballEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed); + +protected: + + // tolua_end + + // cProjectileEntity overrides: + virtual void OnHitSolidBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace) override; + + // tolua_begin + +} ; + + + + + // tolua_end |