From de23a115a5a33a864111262f4dae08b524af422f Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 26 Apr 2014 17:02:47 -0700 Subject: Moved cThrownEggEntity out of ProjectileEntity.h --- src/Entities/ProjectileEgg.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/Entities/ProjectileEgg.h (limited to 'src/Entities/ProjectileEgg.h') diff --git a/src/Entities/ProjectileEgg.h b/src/Entities/ProjectileEgg.h new file mode 100644 index 000000000..464526dfc --- /dev/null +++ b/src/Entities/ProjectileEgg.h @@ -0,0 +1,39 @@ +// +// ProjectileEgg.h +// + +#pragma once + +#include "ProjectileEntity.h" + + + + + +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(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 + +} ; \ No newline at end of file -- cgit v1.2.3