summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-28 12:27:36 +0100
committermtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-28 12:27:36 +0100
commit03f86ad3fcb6503e642119aa7dd292fc0848be53 (patch)
treea4f3dbc34ed571cc42ab10508d3738dee2457eb0 /source/cClientHandle.cpp
parentLittle improvement to save some cpu time but it´s still very heavy cpu load (diff)
downloadcuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar.gz
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar.bz2
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar.lz
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar.xz
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.tar.zst
cuberite-03f86ad3fcb6503e642119aa7dd292fc0848be53.zip
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r--source/cClientHandle.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 2d3bbd87e..39b566ba9 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -825,6 +825,7 @@ void cClientHandle::HandlePacket( cPacket* a_Packet )
Item.m_ItemCount = 1;
LOG("PacketData->m_ItemType: %i", (int)PacketData->m_ItemType);
// Hacked in edible items go!~
+ // TODO: Handle hunger
bool bEat = false;
bool isDoor = false;
switch( Item.m_ItemID )
@@ -861,6 +862,14 @@ void cClientHandle::HandlePacket( cPacket* a_Packet )
m_Player->Heal( 5 ); // 2.5 hearts
bEat = true;
break;
+ case E_ITEM_RAW_CHICKEN:
+ m_Player->Heal(3);
+ bEat = true;
+ break;
+ case E_ITEM_COOKED_CHICKEN:
+ m_Player->Heal( 8 );
+ bEat = true;
+ break;
default:
break;
};