Skip to content

Commit

Permalink
cPlayer should override IsOnGround()
Browse files Browse the repository at this point in the history
  • Loading branch information
Howaner committed Feb 7, 2015
1 parent 9b9ce6f commit 7813cd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Entities/Entity.h
Expand Up @@ -444,8 +444,8 @@ class cEntity
/** Set the invulnerable ticks from the entity */
void SetInvulnerableTicks(int a_InvulnerableTicks) { m_InvulnerableTicks = a_InvulnerableTicks; }

/** Returns whether the player is on ground or not */
bool IsOnGround(void) const { return m_bOnGround; }
/** Returns whether the entity is on ground or not */
virtual bool IsOnGround(void) const { return m_bOnGround; }

// tolua_end

Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Player.h
Expand Up @@ -121,7 +121,7 @@ class cPlayer :
inline void SetStance( const double a_Stance) { m_Stance = a_Stance; }
double GetEyeHeight(void) const; // tolua_export
Vector3d GetEyePosition(void) const; // tolua_export
inline bool IsOnGround(void) const {return m_bTouchGround; } // tolua_export
virtual bool IsOnGround(void) const override {return m_bTouchGround; }
inline double GetStance(void) const { return GetPosY() + 1.62; } // tolua_export // TODO: Proper stance when crouching etc.
inline cInventory & GetInventory(void) { return m_Inventory; } // tolua_export
inline const cInventory & GetInventory(void) const { return m_Inventory; }
Expand Down

0 comments on commit 7813cd2

Please sign in to comment.