summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-15 22:36:31 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-15 22:36:31 +0100
commit277151582fbb0652dcf4e15f67d41f90e08bdeeb (patch)
treefe2c700c7fba45840ced4a2e2a8e31927db57978 /src/ClientHandle.cpp
parentUpdated APIDump (diff)
downloadcuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar.gz
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar.bz2
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar.lz
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar.xz
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.tar.zst
cuberite-277151582fbb0652dcf4e15f67d41f90e08bdeeb.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 9bf4875e2..83fb283b6 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -93,7 +93,7 @@ cClientHandle::cClientHandle(const cSocket * a_Socket, int a_ViewDistance) :
m_UniqueID(0),
m_HasSentPlayerChunk(false),
m_Locale("en_GB"),
- m_LastPlacedBlock(0, -1, 0),
+ m_LastPlacedSign(0, -1, 0),
m_ProtocolVersion(0)
{
m_Protocol = new cProtocolRecognizer(this);
@@ -1501,7 +1501,6 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, e
{
m_Player->GetInventory().RemoveOneEquippedItem();
}
- m_LastPlacedBlock.Set(a_BlockX, a_BlockY, a_BlockZ);
cChunkInterface ChunkInterface(World->GetChunkMap());
NewBlock->OnPlacedByPlayer(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
@@ -1680,8 +1679,9 @@ void cClientHandle::HandleUpdateSign(
const AString & a_Line3, const AString & a_Line4
)
{
- if (m_LastPlacedBlock.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
+ if (m_LastPlacedSign.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
{
+ m_LastPlacedSign.Set(0, -1, 0);
m_Player->GetWorld()->SetSignLines(a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4, m_Player);
}
}
@@ -2262,6 +2262,7 @@ void cClientHandle::SendDisconnect(const AString & a_Reason)
void cClientHandle::SendEditSign(int a_BlockX, int a_BlockY, int a_BlockZ)
{
+ m_LastPlacedSign.Set(a_BlockX, a_BlockY, a_BlockZ);
m_Protocol->SendEditSign(a_BlockX, a_BlockY, a_BlockZ);
}