From b53b40b5610c456176f4b7962e1af1cc49562930 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 7 Aug 2012 12:05:35 +0000 Subject: Prepared WindowOwner class hierarchy for minecart with chest. git-svn-id: http://mc-server.googlecode.com/svn/trunk@719 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChestEntity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/cChestEntity.cpp') diff --git a/source/cChestEntity.cpp b/source/cChestEntity.cpp index 4a46167c0..5d015f42e 100644 --- a/source/cChestEntity.cpp +++ b/source/cChestEntity.cpp @@ -28,6 +28,7 @@ cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cWorld * a_World) , m_JoinedChest( NULL ) { m_Content = new cItem[ c_ChestHeight * c_ChestWidth ]; + SetBlockEntity(this); // cBlockEntityWindowOwner } @@ -173,7 +174,6 @@ void cChestEntity::UsedBy(cPlayer * a_Player) cWindow * Window = new cWindow(this, true, cWindow::Chest, 1); Window->SetSlots(GetContents(), GetChestHeight() * c_ChestWidth); Window->SetWindowTitle("UberChest"); - Window->GetOwner()->SetEntity(this); OpenWindow( Window ); } if ( GetWindow() ) -- cgit v1.2.3