diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-07-31 23:04:00 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-07-31 23:04:00 +0200 |
commit | 84462ba8b20c28136c6a7923323f7cde28a86d70 (patch) | |
tree | a568e3ef01c16deff469dd3612023263603cc2f9 /src/ClientHandle.cpp | |
parent | Merge pull request #1267 from mc-server/RoofedForest (diff) | |
download | cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar.gz cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar.bz2 cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar.lz cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar.xz cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.tar.zst cuberite-84462ba8b20c28136c6a7923323f7cde28a86d70.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 30ec737be..bd76ef227 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -634,6 +634,7 @@ void cClientHandle::HandlePlayerPos(double a_PosX, double a_PosY, double a_PosZ, if (!m_Player->IsSwimming()) { + m_Player->GetStatManager().AddValue(eStatistic::statJumps, 1); m_Player->AddFoodExhaustion(m_Player->IsSprinting() ? 0.8 : 0.2); } } @@ -1067,6 +1068,7 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo return; } + m_Player->AddFoodExhaustion(0.025); ItemHandler->OnBlockDestroyed(World, m_Player, m_Player->GetEquippedItem(), a_BlockX, a_BlockY, a_BlockZ); // The ItemHandler is also responsible for spawning the pickups cChunkInterface ChunkInterface(World->GetChunkMap()); @@ -1212,7 +1214,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e else if ((ItemHandler->IsFood() || ItemHandler->IsDrinkable(EquippedDamage))) { if ((m_Player->IsSatiated() || m_Player->IsGameModeCreative()) && - ItemHandler->IsFood()) + ItemHandler->IsFood() && (Equipped.m_ItemType != E_ITEM_GOLDEN_APPLE)) { // The player is satiated or in creative, and trying to eat return; |