2013-09-07 19:14:57 -04:00
|
|
|
|
|
|
|
// Boat.h
|
|
|
|
|
2013-09-08 11:56:16 -04:00
|
|
|
// Declares the cBoat class representing a boat in the world
|
2013-09-07 19:14:57 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cBoat :
|
|
|
|
public cEntity
|
|
|
|
{
|
|
|
|
typedef cEntity super;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2013-09-07 19:14:57 -04:00
|
|
|
public:
|
2014-07-22 18:36:13 -04:00
|
|
|
CLASS_PROTODEF(cBoat)
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2013-09-07 19:14:57 -04:00
|
|
|
// cEntity overrides:
|
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
|
|
|
virtual void OnRightClicked(cPlayer & a_Player) override;
|
2014-04-25 18:32:30 -04:00
|
|
|
virtual bool DoTakeDamage(TakeDamageInfo & TDI) override;
|
2015-01-11 16:12:26 -05:00
|
|
|
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
|
2013-12-16 12:03:39 -05:00
|
|
|
virtual void HandleSpeedFromAttachee(float a_Forward, float a_Sideways) override;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2013-09-07 19:14:57 -04:00
|
|
|
cBoat(double a_X, double a_Y, double a_Z);
|
2013-09-09 05:13:14 -04:00
|
|
|
|
2016-07-18 16:10:00 -04:00
|
|
|
int GetLastDamage(void) const { return m_LastDamage; }
|
|
|
|
int GetForwardDirection(void) const { return m_ForwardDirection; }
|
|
|
|
|
|
|
|
float GetDamageTaken(void) const { return m_DamageTaken; }
|
|
|
|
|
|
|
|
int GetType(void) const { return m_Type; }
|
|
|
|
|
|
|
|
bool IsRightPaddleUsed(void) const { return m_RightPaddleUsed; }
|
|
|
|
bool IsLeftPaddleUsed(void) const { return m_LeftPaddleUsed; }
|
2013-09-09 05:13:14 -04:00
|
|
|
|
2016-07-18 16:10:00 -04:00
|
|
|
void SetLastDamage(int TimeSinceLastHit);
|
2013-09-09 05:13:14 -04:00
|
|
|
|
2016-07-18 16:10:00 -04:00
|
|
|
void UpdatePaddles(bool rightPaddleUsed, bool leftPaddleUsed);
|
2013-09-09 05:13:14 -04:00
|
|
|
|
2016-07-18 16:10:00 -04:00
|
|
|
private:
|
|
|
|
int m_LastDamage;
|
|
|
|
int m_ForwardDirection;
|
|
|
|
|
|
|
|
float m_DamageTaken;
|
|
|
|
|
|
|
|
int m_Type;
|
|
|
|
|
|
|
|
bool m_RightPaddleUsed;
|
|
|
|
bool m_LeftPaddleUsed;
|
|
|
|
} ;
|