From 3001e23e8cf517de39085f33db170da37df24b17 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 10 Apr 2021 16:58:39 +0100 Subject: Thrown potions/enderpearls: cleanup --- src/Entities/SplashPotionEntity.h | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'src/Entities/SplashPotionEntity.h') diff --git a/src/Entities/SplashPotionEntity.h b/src/Entities/SplashPotionEntity.h index 1a51de1a7..30ca8997d 100644 --- a/src/Entities/SplashPotionEntity.h +++ b/src/Entities/SplashPotionEntity.h @@ -52,43 +52,18 @@ public: // tolua_export cEntityEffect GetEntityEffect(void) const { return m_EntityEffect; } void SetEntityEffect(cEntityEffect a_EntityEffect) { m_EntityEffect = a_EntityEffect; } -protected: +private: cEntityEffect::eType m_EntityEffectType; cEntityEffect m_EntityEffect; int m_PotionColor; cItem m_Item; - - // cProjectileEntity overrides: - virtual void OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace) override; - virtual void OnHitEntity (cEntity & a_EntityHit, Vector3d a_HitPos) override; - virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override - { - if (m_DestroyTimer > 0) - { - m_DestroyTimer--; - if (m_DestroyTimer == 0) - { - Destroy(); - return; - } - } - else - { - Super::Tick(a_Dt, a_Chunk); - } - } - /** Splashes the potion, fires its particle effects and sounds @param a_HitPos The position where the potion will splash */ void Splash(Vector3d a_HitPos); -private: - /** Time in ticks to wait for the hit animation to begin before destroying */ - int m_DestroyTimer; + // cProjectileEntity overrides: + virtual void OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos) override; + virtual void OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace) override; } ; // tolua_export - - - - -- cgit v1.2.3