summaryrefslogtreecommitdiffstats
path: root/source/Entities
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Entities/Player.cpp4
-rw-r--r--source/Entities/Player.h7
2 files changed, 7 insertions, 4 deletions
diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp
index 8ad071453..3ccb4ca1d 100644
--- a/source/Entities/Player.cpp
+++ b/source/Entities/Player.cpp
@@ -340,9 +340,9 @@ void cPlayer::SetFoodTickTimer(int a_FoodTickTimer)
-void cPlayer::SetFoodExhaustionLevel(double a_FoodSaturationLevel)
+void cPlayer::SetFoodExhaustionLevel(double a_FoodExhaustionLevel)
{
- m_FoodExhaustionLevel = std::max(0.0, std::min(a_FoodSaturationLevel, 4.0));
+ m_FoodExhaustionLevel = std::max(0.0, std::min(a_FoodExhaustionLevel, 4.0));
}
diff --git a/source/Entities/Player.h b/source/Entities/Player.h
index 62595f980..5dcce8421 100644
--- a/source/Entities/Player.h
+++ b/source/Entities/Player.h
@@ -171,14 +171,17 @@ public:
void SetFoodLevel (int a_FoodLevel);
void SetFoodSaturationLevel (double a_FoodSaturationLevel);
void SetFoodTickTimer (int a_FoodTickTimer);
- void SetFoodExhaustionLevel (double a_FoodSaturationLevel);
+ void SetFoodExhaustionLevel (double a_FoodExhaustionLevel);
void SetFoodPoisonedTicksRemaining(int a_FoodPoisonedTicksRemaining);
/// Adds to FoodLevel and FoodSaturationLevel, returns true if any food has been consumed, false if player "full"
bool Feed(int a_Food, double a_Saturation);
/// Adds the specified exhaustion to m_FoodExhaustion. Expects only positive values.
- void AddFoodExhaustion(double a_Exhaustion) { m_FoodExhaustionLevel += a_Exhaustion; }
+ void AddFoodExhaustion(double a_Exhaustion)
+ {
+ m_FoodExhaustionLevel += a_Exhaustion;
+ }
/// Starts the food poisoning for the specified amount of ticks; if already foodpoisoned, sets FoodPoisonedTicksRemaining to the larger of the two
void FoodPoison(int a_NumTicks);