From 38f808ac3d09cbb5bf437243f4b050e196fa582c Mon Sep 17 00:00:00 2001 From: Tycho Bickerstaff Date: Sat, 21 Dec 2013 15:00:31 +0000 Subject: ChunkSender is now warnings clean --- src/Entities/Entity.h | 8 ++++---- src/Entities/ProjectileEntity.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 9cb36eb14..0d7634f73 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -351,10 +351,10 @@ public: // tolua_end /// Called when the specified player right-clicks this entity - virtual void OnRightClicked(cPlayer & a_Player) {}; + virtual void OnRightClicked(cPlayer &) {}; /// Returns the list of drops for this pawn when it is killed. May check a_Killer for special handling (sword of looting etc.). Called from KilledBy(). - virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) {} + virtual void GetDrops(cItems & /*a_Drops*/, cEntity * /*a_Killer*/ = NULL) {} protected: static cCriticalSection m_CSCount; @@ -420,11 +420,11 @@ protected: void Dereference( cEntity*& a_EntityPtr ); private: - // Measured in degrees (MAX 360°) + // Measured in degrees (MAX 360°) double m_HeadYaw; // Measured in meter/second (m/s) Vector3d m_Speed; - // Measured in degrees (MAX 360°) + // Measured in degrees (MAX 360°) Vector3d m_Rot; /// Position of the entity's XZ center and Y bottom diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h index 959e81ae5..e9e377fe0 100644 --- a/src/Entities/ProjectileEntity.h +++ b/src/Entities/ProjectileEntity.h @@ -52,7 +52,7 @@ public: virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace); /// Called by the physics blocktracer when the entity hits another entity - virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) {} + virtual void OnHitEntity(cEntity & /*a_EntityHit*/, const Vector3d & /*a_HitPos*/) {} /// Called by Chunk when the projectile is eligible for player collection virtual void CollectedBy(cPlayer * a_Dest); -- cgit v1.2.3 From 9f41761e8ea1eff8980af4dceb7137471538298b Mon Sep 17 00:00:00 2001 From: Tycho Bickerstaff Date: Sat, 21 Dec 2013 15:38:37 +0000 Subject: Root is now warnings clean --- src/Entities/Player.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.h b/src/Entities/Player.h index c0ad9eeac..241eb3050 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -45,7 +45,7 @@ public: virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) override { }; + virtual void HandlePhysics(float /*a_Dt*/, cChunk &) override { }; /// Returns the curently equipped weapon; empty item if none virtual cItem GetEquippedWeapon(void) const override { return m_Inventory.GetEquippedItem(); } @@ -114,7 +114,7 @@ public: double GetEyeHeight(void) const; // tolua_export Vector3d GetEyePosition(void) const; // tolua_export inline bool IsOnGround(void) const {return m_bTouchGround; } // tolua_export - inline const double GetStance(void) const { return GetPosY() + 1.62; } // tolua_export // TODO: Proper stance when crouching etc. + 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; } -- cgit v1.2.3 From d7242414070aa823f879f225b0cf734f4a880759 Mon Sep 17 00:00:00 2001 From: Tycho Bickerstaff Date: Sun, 22 Dec 2013 13:46:55 +0000 Subject: converted commneted paramater names to the unused macro --- src/Entities/Entity.h | 10 +++++++--- src/Entities/Player.h | 2 +- src/Entities/ProjectileEntity.h | 6 +++++- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 0d7634f73..3634f087c 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -354,7 +354,11 @@ public: virtual void OnRightClicked(cPlayer &) {}; /// Returns the list of drops for this pawn when it is killed. May check a_Killer for special handling (sword of looting etc.). Called from KilledBy(). - virtual void GetDrops(cItems & /*a_Drops*/, cEntity * /*a_Killer*/ = NULL) {} + virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) + { + UNUSED(a_Drops); + UNUSED(a_Killer); + } protected: static cCriticalSection m_CSCount; @@ -420,11 +424,11 @@ protected: void Dereference( cEntity*& a_EntityPtr ); private: - // Measured in degrees (MAX 360°) + // Measured in degrees (MAX 360 degrees) double m_HeadYaw; // Measured in meter/second (m/s) Vector3d m_Speed; - // Measured in degrees (MAX 360°) + // Measured in degrees (MAX 360 degrees) Vector3d m_Rot; /// Position of the entity's XZ center and Y bottom diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 0a3f50d19..f9ce950ba 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -45,7 +45,7 @@ public: virtual void Tick(float a_Dt, cChunk & a_Chunk) override; - virtual void HandlePhysics(float /*a_Dt*/, cChunk &) override { }; + virtual void HandlePhysics(float a_Dt, cChunk &) override { UNUSED(a_Dt); }; /// Returns the curently equipped weapon; empty item if none virtual cItem GetEquippedWeapon(void) const override { return m_Inventory.GetEquippedItem(); } diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h index e9e377fe0..4721409ee 100644 --- a/src/Entities/ProjectileEntity.h +++ b/src/Entities/ProjectileEntity.h @@ -52,7 +52,11 @@ public: virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace); /// Called by the physics blocktracer when the entity hits another entity - virtual void OnHitEntity(cEntity & /*a_EntityHit*/, const Vector3d & /*a_HitPos*/) {} + virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) + { + UNUSED(a_EntityHit); + UNUSED(a_HitPos); + } /// Called by Chunk when the projectile is eligible for player collection virtual void CollectedBy(cPlayer * a_Dest); -- cgit v1.2.3 From ee15d4e08e90536afbb381a6d65a418e0027658d Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 30 Dec 2013 17:41:59 +0100 Subject: Fixed compilation in VC2008. Also removed an unused inline header file (yuck). --- src/Entities/Entity.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 3634f087c..2ba1b303d 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -424,11 +424,13 @@ protected: void Dereference( cEntity*& a_EntityPtr ); private: - // Measured in degrees (MAX 360 degrees) + // Measured in degrees, [-180, +180) double m_HeadYaw; + // Measured in meter/second (m/s) Vector3d m_Speed; - // Measured in degrees (MAX 360 degrees) + + // Measured in degrees, [-180, +180) Vector3d m_Rot; /// Position of the entity's XZ center and Y bottom -- cgit v1.2.3 From 782818ffb520553e772bc5a4638009664a821f90 Mon Sep 17 00:00:00 2001 From: Morgan Redshaw Date: Mon, 30 Dec 2013 21:30:20 -0700 Subject: Fixed a cPlayer::IsGameModeAdventure. It was determined based off of gmCreate rather than gmAdventure. --- src/Entities/Player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 67d5a47ef..bc92790aa 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -908,8 +908,8 @@ bool cPlayer::IsGameModeSurvival(void) const bool cPlayer::IsGameModeAdventure(void) const { - return (m_GameMode == gmCreative) || // Either the player is explicitly in Adventure - ((m_GameMode == gmNotSet) && m_World->IsGameModeCreative()); // or they inherit from the world and the world is Adventure + return (m_GameMode == gmAdventure) || // Either the player is explicitly in Adventure + ((m_GameMode == gmNotSet) && m_World->IsGameModeAdventure()); // or they inherit from the world and the world is Adventure } -- cgit v1.2.3