From 6677a5e8ca15dcf796ba6b0dfe66d9d4b5ff8ca9 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 27 Aug 2013 19:57:37 +0200 Subject: Implemented basic physics for projectiles. --- source/Entities/ProjectileEntity.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/Entities/ProjectileEntity.h') diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h index 345730d19..7a97a2215 100644 --- a/source/Entities/ProjectileEntity.h +++ b/source/Entities/ProjectileEntity.h @@ -47,8 +47,8 @@ public: static cProjectileEntity * Create(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d * a_Speed = NULL); - /// Called by the physics blocktracer when the entity hits a solid block, the coords and the face hit is given - virtual void OnHitSolidBlock(double a_BlockX, double a_BlockY, double a_BlockZ, char a_BlockFace) {}; + /// Called by the physics blocktracer when the entity hits a solid block, the block's coords and the face hit is given + virtual void OnHitSolidBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace); // tolua_begin @@ -72,6 +72,10 @@ protected: /// True if the projectile has hit the ground and is stuck there bool m_IsInGround; + + // cEntity overrides: + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; + virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) override; } ; @@ -127,7 +131,6 @@ protected: double m_DamageCoeff; // cEntity overrides: - virtual void Tick(float a_Dt, cChunk & a_Chunk) override; virtual void SpawnOn(cClientHandle & a_Client) override; // tolua_begin -- cgit v1.2.3