From b58f0cabada406deca90272c350c30020d080e2c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 30 May 2013 19:42:19 +0000 Subject: Window contents are sent whenever the window is opened by a player. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1533 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockEntities/ChestEntity.cpp | 1 - source/BlockEntities/DropSpenserEntity.cpp | 1 - source/BlockEntities/FurnaceEntity.cpp | 1 - source/Player.cpp | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) (limited to 'source') diff --git a/source/BlockEntities/ChestEntity.cpp b/source/BlockEntities/ChestEntity.cpp index 769fadc22..cd2b15e2b 100644 --- a/source/BlockEntities/ChestEntity.cpp +++ b/source/BlockEntities/ChestEntity.cpp @@ -110,7 +110,6 @@ void cChestEntity::UsedBy(cPlayer * a_Player) if( a_Player->GetWindow() != GetWindow() ) { a_Player->OpenWindow( GetWindow() ); - GetWindow()->SendWholeWindow(*a_Player->GetClientHandle()); } } diff --git a/source/BlockEntities/DropSpenserEntity.cpp b/source/BlockEntities/DropSpenserEntity.cpp index c0993d676..900ecb172 100644 --- a/source/BlockEntities/DropSpenserEntity.cpp +++ b/source/BlockEntities/DropSpenserEntity.cpp @@ -219,7 +219,6 @@ void cDropSpenserEntity::UsedBy(cPlayer * a_Player) if (a_Player->GetWindow() != Window) { a_Player->OpenWindow(Window); - Window->SendWholeWindow(*a_Player->GetClientHandle()); } } } diff --git a/source/BlockEntities/FurnaceEntity.cpp b/source/BlockEntities/FurnaceEntity.cpp index b199f480b..d4cdf3f89 100644 --- a/source/BlockEntities/FurnaceEntity.cpp +++ b/source/BlockEntities/FurnaceEntity.cpp @@ -88,7 +88,6 @@ void cFurnaceEntity::UsedBy(cPlayer * a_Player) if (a_Player->GetWindow() != GetWindow()) { a_Player->OpenWindow(GetWindow()); - GetWindow()->SendWholeWindow(*a_Player->GetClientHandle()); } } } diff --git a/source/Player.cpp b/source/Player.cpp index 254e58655..8970719f1 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -438,6 +438,7 @@ void cPlayer::OpenWindow(cWindow * a_Window) CloseWindow(); a_Window->OpenedByPlayer(*this); m_CurrentWindow = a_Window; + a_Window->SendWholeWindow(*GetClientHandle()); } -- cgit v1.2.3