summaryrefslogtreecommitdiffstats
path: root/src/Entities/SplashPotionEntity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-10 17:58:39 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2021-04-12 23:35:07 +0200
commit3001e23e8cf517de39085f33db170da37df24b17 (patch)
treeebe073c108753ea9ea95e39406f052643a672af0 /src/Entities/SplashPotionEntity.h
parentcPlayer: move some constants out of header (diff)
downloadcuberite-3001e23e8cf517de39085f33db170da37df24b17.tar
cuberite-3001e23e8cf517de39085f33db170da37df24b17.tar.gz
cuberite-3001e23e8cf517de39085f33db170da37df24b17.tar.bz2
cuberite-3001e23e8cf517de39085f33db170da37df24b17.tar.lz
cuberite-3001e23e8cf517de39085f33db170da37df24b17.tar.xz
cuberite-3001e23e8cf517de39085f33db170da37df24b17.tar.zst
cuberite-3001e23e8cf517de39085f33db170da37df24b17.zip
Diffstat (limited to 'src/Entities/SplashPotionEntity.h')
-rw-r--r--src/Entities/SplashPotionEntity.h33
1 files changed, 4 insertions, 29 deletions
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
-
-
-
-