summaryrefslogtreecommitdiffstats
path: root/source/cSignEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
commit4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a (patch)
treeccc5f55d8f7a15f08bab8f0222fd1b2f95e5d7a2 /source/cSignEntity.cpp
parentRemoved redstone debugging: powered dirt blocks change into stone (diff)
downloadcuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.gz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.bz2
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.lz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.xz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.zst
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.zip
Diffstat (limited to 'source/cSignEntity.cpp')
-rw-r--r--source/cSignEntity.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/source/cSignEntity.cpp b/source/cSignEntity.cpp
index c181deae2..3f0befc3f 100644
--- a/source/cSignEntity.cpp
+++ b/source/cSignEntity.cpp
@@ -81,25 +81,17 @@ AString cSignEntity::GetLine( int a_Index ) const
-void cSignEntity::SendTo( cClientHandle* a_Client )
+cPacket * cSignEntity::GetPacket(void)
{
- cPacket_UpdateSign Sign;
- Sign.m_PosX = m_PosX;
- Sign.m_PosY = (short)m_PosY;
- Sign.m_PosZ = m_PosZ;
- Sign.m_Line1 = m_Line[0];
- Sign.m_Line2 = m_Line[1];
- Sign.m_Line3 = m_Line[2];
- Sign.m_Line4 = m_Line[3];
-
- if ( a_Client != NULL )
- {
- a_Client->Send( Sign );
- }
- else // broadcast of a_Client == 0
- {
- m_World->BroadcastToChunkOfBlock(m_PosX, m_PosY, m_PosZ, &Sign );
- }
+ cPacket_UpdateSign * Sign = new cPacket_UpdateSign;
+ Sign->m_PosX = m_PosX;
+ Sign->m_PosY = (short)m_PosY;
+ Sign->m_PosZ = m_PosZ;
+ Sign->m_Line1 = m_Line[0];
+ Sign->m_Line2 = m_Line[1];
+ Sign->m_Line3 = m_Line[2];
+ Sign->m_Line4 = m_Line[3];
+ return Sign;
}