1
0

Furnace window progressbars are initialized when the window is opened

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1613 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-06-20 11:46:08 +00:00
parent 8dd5fe5070
commit 0aba613084
2 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,8 @@ void cFurnaceEntity::UsedBy(cPlayer * a_Player)
if (a_Player->GetWindow() != Window) if (a_Player->GetWindow() != Window)
{ {
a_Player->OpenWindow(Window); a_Player->OpenWindow(Window);
BroadcastProgress(PROGRESSBAR_FUEL, m_LastProgressFuel);
BroadcastProgress(PROGRESSBAR_SMELTING, m_LastProgressCook);
} }
} }
} }

View File

@ -126,6 +126,8 @@ protected:
int m_LastProgressFuel; ///< Last value sent as the progress for the fuel int m_LastProgressFuel; ///< Last value sent as the progress for the fuel
int m_LastProgressCook; ///< Last value sent as the progress for the cooking int m_LastProgressCook; ///< Last value sent as the progress for the cooking
/// Sends the specified progressbar value to all clients of the window
void BroadcastProgress(int a_ProgressbarID, short a_Value); void BroadcastProgress(int a_ProgressbarID, short a_Value);
/// One item finished cooking /// One item finished cooking