summaryrefslogtreecommitdiffstats
path: root/source/Player.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-04 13:47:31 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-04 13:47:31 +0200
commit4aed49a70fe2e4fa3600b31525766c52bff52e3d (patch)
treed17c4a960f4fea8c4020c0b5b6eba1d951fe25da /source/Player.cpp
parentFixed CreateHexDump() filling the string with garbage (diff)
downloadcuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.gz
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.bz2
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.lz
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.xz
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.tar.zst
cuberite-4aed49a70fe2e4fa3600b31525766c52bff52e3d.zip
Diffstat (limited to 'source/Player.cpp')
-rw-r--r--source/Player.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/source/Player.cpp b/source/Player.cpp
index a96967360..af2e00570 100644
--- a/source/Player.cpp
+++ b/source/Player.cpp
@@ -455,27 +455,8 @@ void cPlayer::OpenWindow( cWindow* a_Window )
void cPlayer::CloseWindow(char a_WindowType)
{
- if (m_CurrentWindow == m_InventoryWindow)
- {
- // The inventory window must not be closed and must not be even sent a close packet
- if (IsDraggingItem()) // But we need to check if player is holding anything
- {
- LOGD("Player holds item in inventory window! Dropping it...");
- TossItem(true, GetDraggingItem().m_ItemCount);
- }
- return;
- }
-
if (m_CurrentWindow != NULL)
{
- // TODO: This code should be in cChestWindow instead
- if ((a_WindowType == 1) && (m_CurrentWindow->GetWindowType() == cWindow::Chest))
- {
- int x, y, z;
- m_CurrentWindow->GetOwner()->GetBlockPos(x, y, z);
- m_World->BroadcastBlockAction(x, y, z, 1, 0, E_BLOCK_CHEST);
- }
-
m_CurrentWindow->ClosedByPlayer(*this);
}
m_CurrentWindow = m_InventoryWindow;