diff options
Diffstat (limited to '')
-rw-r--r-- | source/DeadlockDetect.cpp | 2 | ||||
-rw-r--r-- | source/Entities/Player.cpp | 4 | ||||
-rw-r--r-- | source/Entities/Player.h | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/source/DeadlockDetect.cpp b/source/DeadlockDetect.cpp index de9a32d39..5af3f973d 100644 --- a/source/DeadlockDetect.cpp +++ b/source/DeadlockDetect.cpp @@ -62,7 +62,7 @@ bool cDeadlockDetect::Start(void) void cDeadlockDetect::Execute(void) { - // Loop until the event is signalled + // Loop until the signal to terminate: while (!m_ShouldTerminate) { // Check the world ages: 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); |