Hunger-per-distance is calculated only for the XZ distance
This commit is contained in:
parent
d155c1cb00
commit
0caadbb25c
@ -1323,6 +1323,7 @@ void cPlayer::ApplyFoodExhaustionFromMovement(cChunk & a_Chunk)
|
|||||||
|
|
||||||
// Calculate the distance travelled, update the last pos:
|
// Calculate the distance travelled, update the last pos:
|
||||||
Vector3d Movement(GetPosition() - m_LastFoodPos);
|
Vector3d Movement(GetPosition() - m_LastFoodPos);
|
||||||
|
Movement.y = 0; // Only take XZ movement into account
|
||||||
m_LastFoodPos = GetPosition();
|
m_LastFoodPos = GetPosition();
|
||||||
|
|
||||||
// If riding anything, apply no food exhaustion
|
// If riding anything, apply no food exhaustion
|
||||||
|
Loading…
Reference in New Issue
Block a user