From 1aebcea095e92572a39cb6555cba8517234b156c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 15 Feb 2012 14:22:44 +0000 Subject: Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window) git-svn-id: http://mc-server.googlecode.com/svn/trunk@263 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChestEntity.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/cChestEntity.cpp') diff --git a/source/cChestEntity.cpp b/source/cChestEntity.cpp index e96d4bbb2..c79057829 100644 --- a/source/cChestEntity.cpp +++ b/source/cChestEntity.cpp @@ -184,7 +184,7 @@ void cChestEntity::SendTo( cClientHandle* a_Client, cServer* a_Server ) -void cChestEntity::UsedBy( cPlayer & a_Player ) +void cChestEntity::UsedBy( cPlayer * a_Player ) { LOG("Used a chest"); // m_Content[0].m_ItemCount = 1; @@ -203,10 +203,10 @@ void cChestEntity::UsedBy( cPlayer & a_Player ) } if ( GetWindow() ) { - if( a_Player.GetWindow() != GetWindow() ) + if( a_Player->GetWindow() != GetWindow() ) { - a_Player.OpenWindow( GetWindow() ); - GetWindow()->SendWholeWindow( a_Player.GetClientHandle() ); + a_Player->OpenWindow( GetWindow() ); + GetWindow()->SendWholeWindow( a_Player->GetClientHandle() ); } } cPacket_BlockAction ChestOpen; @@ -215,7 +215,7 @@ void cChestEntity::UsedBy( cPlayer & a_Player ) ChestOpen.m_PosZ = GetPosZ(); ChestOpen.m_Byte1 = (char)1; ChestOpen.m_Byte2 = (char)1; - m_World->GetChunkOfBlock(m_PosX, m_PosY, m_PosZ)->Broadcast(&ChestOpen); + m_World->BroadcastToChunkOfBlock(m_PosX, m_PosY, m_PosZ, &ChestOpen); } -- cgit v1.2.3