diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-30 19:54:36 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-09-30 19:54:36 +0200 |
commit | a7b029654c524d2da85d6ab9de2e4f1ae0bcc748 (patch) | |
tree | f3dd2cfaa14ea5a0600aebd3edaf597cc2d069fa /src/Entities/Boat.h | |
parent | Explodinator: fix division by zero (diff) | |
download | cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.gz cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.bz2 cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.lz cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.xz cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.zst cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Boat.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/Entities/Boat.h b/src/Entities/Boat.h index 4a583a26c..244d681a8 100644 --- a/src/Entities/Boat.h +++ b/src/Entities/Boat.h @@ -43,17 +43,13 @@ public: // cEntity overrides: virtual void SpawnOn(cClientHandle & a_ClientHandle) override; - virtual void BroadcastMovementUpdate(const cClientHandle * a_Exclude = nullptr) override; virtual void OnRightClicked(cPlayer & a_Player) override; + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer) override; + virtual void KilledBy(TakeDamageInfo & a_TDI) override; virtual bool DoTakeDamage(TakeDamageInfo & TDI) override; - virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override; + virtual void HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override; virtual void HandleSpeedFromAttachee(float a_Forward, float a_Sideways) override; - int GetLastDamage(void) const { return m_LastDamage; } - int GetForwardDirection(void) const { return m_ForwardDirection; } - - float GetDamageTaken(void) const { return m_DamageTaken; } - // tolua_begin /** Returns the eMaterial of the boat */ @@ -76,20 +72,18 @@ public: // tolua_end - bool IsRightPaddleUsed(void) const { return m_RightPaddleUsed; } bool IsLeftPaddleUsed(void) const { return m_LeftPaddleUsed; } + bool IsRightPaddleUsed(void) const { return m_RightPaddleUsed; } - void SetLastDamage(int TimeSinceLastHit); + float GetDamageTaken(void) const; + bool ShouldShakeForwards(void) const; - void UpdatePaddles(bool rightPaddleUsed, bool leftPaddleUsed); -private: - int m_LastDamage; - int m_ForwardDirection; + void UpdatePaddles(bool a_RightPaddleUsed, bool a_LeftPaddleUsed); - float m_DamageTaken; +private: eMaterial m_Material; - - bool m_RightPaddleUsed; bool m_LeftPaddleUsed; + bool m_RightPaddleUsed; + bool m_ShouldShakeForwards; } ; // tolua_export |