diff options
author | Mattes D <github@xoft.cz> | 2014-08-01 17:43:18 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-01 17:43:18 +0200 |
commit | d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8 (patch) | |
tree | 20fd08c3d16c6e21bfec17b3252b8cd48c923e59 /src/ClientHandle.cpp | |
parent | Merge pull request #1269 from Howaner/BlockEntitys (diff) | |
parent | Compile fix. (diff) | |
download | cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.gz cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.bz2 cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.lz cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.xz cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.tar.zst cuberite-d2744713bb69ca7c6211fe9b7bdf6fcadd2cadc8.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 3ce506e1e..7bac41062 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -635,6 +635,7 @@ void cClientHandle::HandlePlayerPos(double a_PosX, double a_PosY, double a_PosZ, if (!m_Player->IsSwimming()) { + m_Player->GetStatManager().AddValue(statJumps, 1); m_Player->AddFoodExhaustion(m_Player->IsSprinting() ? 0.8 : 0.2); } } @@ -1121,6 +1122,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()); @@ -1266,7 +1268,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; |