diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-04 14:54:33 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-04 14:54:33 +0100 |
commit | fb7c60ec11fde185d30ae6cc59e8c85756f85b8f (patch) | |
tree | 842851c4f6561782c663144dd2f5bed8a441b511 /source/cClientHandle.cpp | |
parent | Got rid of some hardcoded numbers, now using hardcoded variables! woo (diff) | |
download | cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar.gz cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar.bz2 cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar.lz cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar.xz cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.tar.zst cuberite-fb7c60ec11fde185d30ae6cc59e8c85756f85b8f.zip |
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r-- | source/cClientHandle.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 9f054aec2..f27ca9e61 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -823,16 +823,18 @@ void cClientHandle::HandleBlockDig(cPacket_BlockDig * a_Packet) return;
}
- int pX = a_Packet->m_PosX, pY = a_Packet->m_PosY, pZ = a_Packet->m_PosZ;
+ int pX = a_Packet->m_PosX;
+ unsigned char pY = a_Packet->m_PosY;
+ int pZ = a_Packet->m_PosZ;
- AddDirection(pX, (char &) pY, pZ, a_Packet->m_Direction);
+ AddDirection(pX, pY, pZ, a_Packet->m_Direction);
char PossibleBlock = World->GetBlock(pX, pY, pZ);
if (PossibleBlock == E_BLOCK_FIRE)
{
a_Packet->m_PosX = pX;
- a_Packet->m_PosY = (char)pY;
+ a_Packet->m_PosY = pY;
a_Packet->m_PosZ = pZ;
bBroken = true;
}
@@ -1299,7 +1301,7 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet) else if (IsValidBlock(a_Packet->m_ItemType))
{
int X = a_Packet->m_PosX;
- char Y = a_Packet->m_PosY;
+ int Y = a_Packet->m_PosY;
int Z = a_Packet->m_PosZ;
AddDirection(X, Y, Z, a_Packet->m_Direction);
|