1
0

Simpler code.

This commit is contained in:
Alexander Harkness 2014-10-18 16:12:12 +01:00
parent 59902c28f2
commit f280c36f9d

View File

@ -96,9 +96,8 @@ bool cFurnaceEntity::Tick(float a_Dt, cChunk & a_Chunk)
if (m_FuelBurnTime <= 0)
{
// Cooked time decreases twice as fast when ran out of fuel
m_TimeCooked -= 2;
m_TimeCooked = std::max(m_TimeCooked, 0);
// If a furnace is out of fuel, the progress bar reverses at twice the speed of cooking.
m_TimeCooked = std::max((m_TimeCooked - 2), 0);
// Reset progressbars, block type, and bail out
a_Chunk.FastSetBlock(GetRelX(), m_PosY, GetRelZ(), E_BLOCK_FURNACE, m_BlockMeta);