1
0
Fork 0

Suggestions'd #2

This commit is contained in:
Tiger Wang 2014-05-06 19:38:01 +01:00
parent 1df7dbe7c9
commit cca8376a01
2 changed files with 6 additions and 1 deletions

View File

@ -212,7 +212,7 @@ void cPlayer::Tick(float a_Dt, cChunk & a_Chunk)
SendExperience();
}
if (!(GetPosition() - m_LastPos).Equals(Vector3d(0, 0, 0))) // Change in position from last tick?
if (GetPosition() != m_LastPos) // Change in position from last tick?
{
// Apply food exhaustion from movement:
ApplyFoodExhaustionFromMovement();

View File

@ -113,6 +113,11 @@ public:
return Equals(a_Rhs);
}
inline bool operator != (const Vector3<T> & a_Rhs) const
{
return !Equals(a_Rhs);
}
inline bool operator < (const Vector3<T> & a_Rhs)
{
// return (x < a_Rhs.x) && (y < a_Rhs.y) && (z < a_Rhs.z); ?